Hi I am Unable find the "Field/UnBoundField" object on Right Click of Label/FieldHeader.?
I tried with Paranet, tempalted Parent , VisualTreeHealper.. but didnt helped.
Could you please give me a hint or example how can I Achive it..
HI,
Create a style targeting the LabelPresenter and wire up the PreviewMouseRightButtonDown Event.
<Style TargetType="{x:Type igDP:LabelPresenter}"> <EventSetter Event="PreviewMouseRightButtonDown" Handler="xgrid1_PreviewMouseRightButtonDown"/> </Style>
private void xgrid1_PreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e) { LabelPresenter lp = sender as LabelPresenter; MessageBox.Show(lp.Field.Name); }
Sincerely,MattDeveloper Support Engineer
I already tried this earlier.. But events dose not get fired... I dont know why....
I tried with you sent code as well but events doesn't seems to get fire.
Could you please cross check ...
My Bad... Sorry..
Actualy i was creating Fields at runtime . So I have to attache LabelPresenterStyle at run time only..
It Worked... Thanks..