How to set treeview Nodes checked property is true?
-
I have 1 treeView for category & subcategory. It is filling by database. I saved all checked nodes value of treeview control in table "AvailableSubCategory" Now, I want to make a modification in data, So that, I want to check only that subcategory Nodes of TreeView, that are in "AvailableSubCategory" table. How can I do this?
-
I have 1 treeView for category & subcategory. It is filling by database. I saved all checked nodes value of treeview control in table "AvailableSubCategory" Now, I want to make a modification in data, So that, I want to check only that subcategory Nodes of TreeView, that are in "AvailableSubCategory" table. How can I do this?
kripa ostwal wrote:
So that, I want to check only that subcategory Nodes of TreeView, that are in "AvailableSubCategory" table. How can I do this?
How is this related to ASP.Net?
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
-
I have 1 treeView for category & subcategory. It is filling by database. I saved all checked nodes value of treeview control in table "AvailableSubCategory" Now, I want to make a modification in data, So that, I want to check only that subcategory Nodes of TreeView, that are in "AvailableSubCategory" table. How can I do this?
your question was not clear... :doh: :doh:
Padmanabhan My Articles[^]
-
your question was not clear... :doh: :doh:
Padmanabhan My Articles[^]
Sir, I want to ckeck some childnode from TreeView, which have category(nodes of treeview) and subCategories(nodes of category nodes) information. When user click on btnModify, I want to show all details on page from database (whatever subCategories he selected at save time) In database I stored values of checked subCategories(at the time of Save record. For that I Used following code to get selected Nodes values For intCnt = 0 To TreeView1.CheckedNodes.Count - 1 arrSubCat(intCnt) = (TreeView1.CheckedNodes(intCnt).Value) Next Then I stored that onebyone in database At the time of modification, I retrive that subCategory values in object of datatable. Now I want to show checkmarks for those subCategories nodes, where values will match. For that i wrote, If objDT.Rows.Count > 0 Then For intCnt = 0 To objDT.Rows.Count - 1 TreeView1.FindNode(objDT.Rows(intCnt).Item (0).ToString).Checked = True Next End If But It gives error s Index Out of bound