Please tel me how to capture column header click event. In default settings when click on columns header its get sorting. Handling sorting event is not sufficient for me.. because I want to capture the event when Label action set to other options as well.
You can handle the PreviewMouseLeftButtonDown event and traverse the visual tree from the (e.OriginalSource) and find if there is an ancestor of type LabelPresenter. For this, you can use our helper methods : Infragistics.Windows.Utilities.GetAncestorFromType(...);
Hi Alex
Infragistics.Windows.Utilities.GetAncestorFromType(X, typeof(LabelPresenter), true);
here X has to be dependacy object. I cant use e.OriginalSource there. I tried with giving XamDataGrid object for this. But it returns null.
Could you please tel me how to use this util function?
DependencyObject is a base class and the e.OriginalSource is also a dependency object, all you need is to cast it :
e.OriginalSource as DependencyObject
Thanx Alex,
It's working