This is a migrated thread and some comments may be shown as answers.

Load-On-Demand and Tri-State Checkboxes

4 Answers 158 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Wyatt
Top achievements
Rank 1
Wyatt asked on 05 May 2010, 12:14 AM
I am partially populating a large tree and enabling load on demand and tri-state checkboxes.  At the time of partial population of the tree, I know which load-on-demand nodes have checked children, but I can find no way to communicate this to the tree object.  Node.CheckedState is read-only.  If I can't do this, checkboxes are potentially inaccurate until the entire tree has been expanded, which eliminates the value of load-on-demand.

Am I missing something?  Is there a work-around for this?  If not, please consider adding this capability in a future release.

4 Answers, 1 is accepted

Sort by
0
Nikolay Tsenkov
Telerik team
answered on 05 May 2010, 04:21 PM
Hi Wyatt,

The tri-state checkboxes are not a valid case if you load on demand the nodes. This is because you can not explicitly set the 3rd state of the checkbox - you can only set Checked=true/false;. The 3rd variant is coming implicitly, so if you don't have the entire tree by the time of of checkbox processing you will recieve as you said "inaccurate" checkboxes.

Also about the property CheckState:
This is only a getter-property - you can not set it.

Summary:
The functionality that you need is not supported by our product.

If you need some kind of work-around, contact with us again and we will do our best to provide you with an option.

Kind regards,
Nikolay Tsenkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Wyatt
Top achievements
Rank 1
answered on 05 May 2010, 04:28 PM
Thanks for your response.  I can work around it by partially populating the tree with all the nodes that are checked, but this will not perform well with large trees that have many lower nodes that are checked.  A better workarround would be nice, but I can live without it for now.
0
Andrew
Top achievements
Rank 1
answered on 09 Jun 2011, 02:37 PM
Hi,

I have the same requirement as described here, I have a large treeView 20,000+ nodes and am currently populating the tree on demand, but I need to show if the node is indeterminate or not.
I have other treeViews displayed with tri-state that are smaller and not populated on demand, the inconsistency in the UI is a problem.

The typical usage here is that the large majority of nodes will be unchecked, the user navigates to the treeView and is presented with a unchecked first level with no indication of where the checked nodes may sit the whole tree.
If users need to open up each node to search for checked nodes, this will not work.

In the SQL query that populates the child nodes being loaded, I can easily calculate if the node should be checked, unchecked or indeterminate and pass the result to the treeView, but according to this post there is no functionality to do so.

Has this changed in the interim, this post is a year old.

If not, what options are available to work around this? Possibly in the JavaScript.

Regards,
Andrew
0
Nikolay Tsenkov
Telerik team
answered on 13 Jun 2011, 05:09 PM
Hi Andrew,

This is still not supported.
My advice is to implement using a NodeTemplate. You can then implement the custom logic required by your scenario and for example add to the Attributes collection of the currently loaded nodes if they are Checked, Unchecked or Indeterminate. And then client-side to style the nodes according to this attribute.


Regards,
Nikolay Tsenkov
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
TreeView
Asked by
Wyatt
Top achievements
Rank 1
Answers by
Nikolay Tsenkov
Telerik team
Wyatt
Top achievements
Rank 1
Andrew
Top achievements
Rank 1
Share this question
or