We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Setting selected node

Thread ID:





121500 Dec 21,2015 05:05 PM UTC Dec 23,2015 04:44 AM UTC WPF 3
Tags: GridTreeControl
Volkan Paksoy
Asked On December 21, 2015 05:05 PM UTC


In my application I have 2 GridTree controls. When the application launches it reads some data and depending on that populates the first grid and based on the selected value the second one's contents are loaded. 

Is it possible to set the selected row of a grid programmatically on start? I set SelectedNode value but the row doesn't appear to be selected.


Sowndaiyan Paulpandi [Syncfusion]
Replied On December 22, 2015 10:54 AM UTC

Hi Volkan,

Thank you for contacting Syncfusion Support.

We have analyzed your query. You can achieve your requirement “set the selected row of a grid programmatically on initially” like the below code example. In this code example, we have added the corresponding node to TreeGrid.InternalGrid.SelectedNodes and the IsSelected property of the particular node is set to true.

Code Example [C#]:




            this.treeGrid.Loaded += treeGrid_Loaded;


void treeGrid_Loaded(object sender, RoutedEventArgs e)


            var Node = treeGrid.InternalGrid.Nodes.FirstOrDefault(node => (node.Item as EmployeeInfo).EmpID == 1005);

            if (Node == null)


            Node.IsSelected = true;



We have prepared a sample as per your requirement and you can download sample from the below location,

Sample : http://www.syncfusion.com/downloads/support/forum/121500/ze/Tree_node_selection_with_specific_row831819400



Volkan Paksoy
Replied On December 22, 2015 11:03 AM UTC

Worked beautifully! Thank you very much for the help.

Sowndaiyan Paulpandi [Syncfusion]
Replied On December 23, 2015 04:44 AM UTC

Hi Volkan,

Thanks for the update.

Please let us know if you need further assistance.




This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon