How to programmatically select nodes in GridTreeControl

Hi.  How can I programmatically select nodes in GridTreeControl?
I tried Node.IsSelected = true but that doesn't work.

Thanks
Ariel

1 Reply

RV Ramesh V Syncfusion Team August 21, 2012 09:50 AM UTC

Hi,

Thanks for your interest in Syncfusion products.

We have analyzed your query and by applying IsSelected to true is not enough to make a node as selected node.  We should add the node to the SelectedNodes collection then only the node is set to selected node.

By using the following code we can achieve you requirements.

Code Snippet[C#]:

    

    treeGrid1.InternalGrid.Nodes[index].IsSelected = true;

    treeGrid1.InternalGrid.SelectedNodes.Add(treeGrid1.InternalGrid.Nodes[index]);

 

 

Also we have prepared a sample for this and please find the sample under the following location.

Sample: http://www.syncfusion.com/downloads/Support/DirectTrac/97834/GTCSelectedNode-2135014629.zip

 

Please let us know if this helps.

Regards,

Ramesh


Loader.
Up arrow icon