Click here to Skip to main content
15,309,768 members
Please Sign up or sign in to vote.
2.33/5 (2 votes)
See more:
Added button in cell template of the datagrid in wpf,On click of button event will hit the row selction changed event instead of button click event. i need both events.How can i Distinguish both events? in c# code.
Posted

1 solution

see OriginalSource property of SelectionChangedEventArgs, which tells what control raised the event if it is a button then you may apply check to skip code in event handler
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900