In XAMDataGrid..when User click on My Header i want to perfon some action.
e.g. I have Person Record. It has ID and Name which is bound to XAMDataGrid.
Now..when user click on Header ( ID ) ..I want to show dialog box where user wil enter value.
I cant' find a way to do this..
Plz help
thanks
BR
You could either create a LabelPresenterStyle for the first Field (ID) and use EventSetter to handle the PreviewMouseLeftButtonDown or you can use the EventManager.RegisterClassHandler method to register default handler in codebehind. Note that this could probably disable the sorting on the Field.
<Style TargetType="{x:Type igDP:LabelPresenter}">
<EventSetter Event="PreviewMouseLeftButtonDown"
Handler="lp_PreviewMouseLeftButtonDown"/>
</Style>
void lp_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
MessageBox.Show("LabelPresenter");
}
Let me know if you have any questions with this matter.
It suppreses the ungrouping also ..
Hello Jaffar,
Could you please be more specific what is your issue and when does it occurs. Also it will be great if you could send us an isolated sample project, where the issue is reproduced, so I can investigate it further for you.
Looking forward for your reply.