Hello,
I have a combobox that has a tree view nested inside. So far so good. I have a prerender event that I was planning on using to populate the tree from a dataset.
#1. First problem...For some reason the event fires 3 times resulting in the node list being created 3 times. I thought it might have to do with having 3 levels of nodes but going back to one still presents the same problem. As I understand the ASP page cycle this shouldn't be happening?
#2. Second problem is more of a question. How do I bind the data to the nodes? I have a table with say three columns State, City, School. At the top node I want State, Below The State I want all corresponding Cities, Below the Cities schools. Now I know how to generate a SQL query to get this data so lets call that done. How then shall I bind it? To each node individually? If so do I have to "loop" through putting the row into a DataRow object and then binding to each nodes DataItem?
#3. The cherry on top. Once a school has been selected I need to display that selection in the combobox and populate the comboboxes value field with the school ID. Can this be done client side or will I have to post back to update the combobox and what about the school id? Where should I hide that data while I'm waiting for them to pick a school...in a hidden (visible=false) tree view under the school?
Thanks
JB
I have a combobox that has a tree view nested inside. So far so good. I have a prerender event that I was planning on using to populate the tree from a dataset.
#1. First problem...For some reason the event fires 3 times resulting in the node list being created 3 times. I thought it might have to do with having 3 levels of nodes but going back to one still presents the same problem. As I understand the ASP page cycle this shouldn't be happening?
#2. Second problem is more of a question. How do I bind the data to the nodes? I have a table with say three columns State, City, School. At the top node I want State, Below The State I want all corresponding Cities, Below the Cities schools. Now I know how to generate a SQL query to get this data so lets call that done. How then shall I bind it? To each node individually? If so do I have to "loop" through putting the row into a DataRow object and then binding to each nodes DataItem?
#3. The cherry on top. Once a school has been selected I need to display that selection in the combobox and populate the comboboxes value field with the school ID. Can this be done client side or will I have to post back to update the combobox and what about the school id? Where should I hide that data while I'm waiting for them to pick a school...in a hidden (visible=false) tree view under the school?
Thanks
JB