|
Rank: Member Groups: Member
Joined: 1/21/2011 Posts: 11
|
Hi There, I am trying to do something that I think should be very simple but can't seem to get it to work.
1) I have a dataset with three fields Company Type, Company Name, Contact. 2) I want to build a treeview with this data and have checkboxes ONLY on the Company Name level. 3) I want the treeview to have the first level expanded when loaded (i.e. You see the types and all companies for those types but not the contacts for the individual companies.)
I can turn on check boxes on or off for all levels but not for just the second level. Do I need to do something in the load event of the form to get the treeview to expand or is there a setting on the treeview that I am missing?
Thanks Ian
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You can not have checkboxes just on one level. It's either on or off on all levels.
You can expand a node by setting the node's Expanded to true.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 1/21/2011 Posts: 11
|
That's a little disappointing. It would definitely bee a nice feature to have. I found in an earlier post (http://www.essentialobjects.com/forum/postst1683_Disable-checkbox.aspx) the suggestion to add a checkbox to a nodes text property. This might work. Is there a way to link such a checkbox to the treeview so I would be able to tell what node a particular checkbox is associated with?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
The information in that link is correct. While it is technical doable, we have no plan to build that into the TreeView though due to the complexity of the feature and the fact that only a very small number of people are interested in such a feature.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 5/30/2007 Posts: 30
|
I have done something like this before. Loop through the tree turning on the nodes you want on.
TreeView1.Nodes(i).ShowCheckBox = EO.Web.NullableBool.True
Perhaps some code to only set true on nodes that have Both a parent node and a child node.
|
|