asp.net - How to change the checked property of a TreeViewNode In TreeView ,Its source is XMldataSource? -
I added an XmlDtaSource to with check boxes with TreeView . I want to populate user permissions
and asp: treeview id = "treeview1" runat = "server" expand = "2" ShowCheckBoxes = "all" ShowLines = "True" & gt; & Lt; Databindings & gt; & Lt; Asp: TreeNodeBinding ValueField = "value" datamember = "menu node" TextField = "title" /> & Lt; / Databindings & gt; & Lt; / ASP: TreeView & gt;
I want to change the value of the checkbox (checked or not) according to one field in XML. how to do this ? Plz
Do something like this
secure zero page_load (object Sender, EventAgages E) {foreach (tree node node in Tree View 1 node) {Setnode (node); }} Zero setnode (tree node node) {if (node. Text == "check status") // node. Use the datatyme to get the data that surrounds your data and use this ID to see your flag in the source of actual data. Maybe you want to return a function that bool {node. Check = false; } If (node.childnodes.count> gt; 0) {foreach (turn node in node childnode. Childnode) {setnode (balanod); }}}
I have not given you some clue and have not answered the exact answer with hope.
Comments
Post a Comment