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.
Unfortunately, activation email could not send to your email. Please try again.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

123773 Apr 20,2016 04:33 AM Apr 25,2016 02:03 AM WPF 3
loading
Tags: GridTreeControl
Andrey
Asked On April 20, 2016 04:33 AM

Hello!

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

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

...

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?

Jai Ganesh S [Syncfusion]
Replied On April 21, 2016 11:07 AM

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

  }

Regards,

Jai Ganesh S


Andrey
Replied On April 23, 2016 06:56 PM

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

Jai Ganesh S [Syncfusion]
Replied On April 25, 2016 02:03 AM

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


CONFIRMATION

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.

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.

;