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. Image for the cookie policy date

How to control the focused node's change in GridTreeControl?


I am currently testing the GridTreeControl and I need functionality similar to ListViewItem's GotFocus event for GridTree's node / row.

                    <ListViewItem Content="Stuff" GotFocus="ListViewItem_GotFocus" />


private void ListViewItem_GotFocus(object sender, RoutedEventArgs e)
            var title = (sender as MyClass)?.Title;

I have a databound GridTree and I load data in other controls based on the focused item's underlying class in the GridTree. The focus will be changed via mouse, keyboard or code. I would like one event to capture all of them, like Node_GotFocus.

 How can this be achieved?

3 Replies

JG Jai Ganesh S Syncfusion Team April 21, 2016 03:07 PM UTC

Hi Andrey,

You can achieve your requirement for wiring the event when selecting the tree grid row by using the below code,

this.treeGrid.Model.SelectionChanged += Model_SelectionChanged

void Model_SelectionChanged(object sender, GridSelectionChangedEventArgs e)


      //Do your actions here



Jai Ganesh S

AN Andrey April 23, 2016 10:56 PM UTC

Thank you, Jai Ganesh S! That is exactly what I needed.

JG Jai Ganesh S Syncfusion Team April 25, 2016 06:03 AM UTC

Hi Andrey, 
Thank you for the update. 
Please let us know if you need further assistance on this. 
Jai Ganesh S 

Live Chat Icon For mobile
Up arrow icon