This question is locked. New answers and comments are not allowed.
Im trying to catch the left mouse button event in the gridview so I can enable double clicking and open a popup window. I know the event args has a count of clicks and I can catch a double click event that way but my problem is that the rows and columns in the gridview don't seem to respond to the mouse button event.
When I click on the sides of the gridview or on the header it catches it fine, but as soon as I click on a row it doesn't seem to catch it at all. Is there any way I can attach the left mouse button up event to the cells or rows of the gridview?
I would prefer to be able to do it in xaml, I know I can use the rowcreating event to attach an eventhandler to each row as it is created but since Im using Prism and Commanding I would prefer to be able to use xaml, as I can then bind the event to a delegate in my view model.
If the last part doesn't make sense to you, all I need is to have the left mouse button up event to fire when clicking on a cell or row, and I want to be able to set it in xaml, not the code behind. Is this possible?
For some extra clarity, here is the code I have right now:
(replaced some variables with dummy data)
When I click on the sides of the gridview or on the header it catches it fine, but as soon as I click on a row it doesn't seem to catch it at all. Is there any way I can attach the left mouse button up event to the cells or rows of the gridview?
I would prefer to be able to do it in xaml, I know I can use the rowcreating event to attach an eventhandler to each row as it is created but since Im using Prism and Commanding I would prefer to be able to use xaml, as I can then bind the event to a delegate in my view model.
If the last part doesn't make sense to you, all I need is to have the left mouse button up event to fire when clicking on a cell or row, and I want to be able to set it in xaml, not the code behind. Is this possible?
For some extra clarity, here is the code I have right now:
| <telerikGrid:RadGridView x:Name="TasksGridView" |
| ItemsSource="{Binding Tests}" |
| DataContext="{Binding}" |
| AutoGenerateColumns="False" |
| IsReadOnly="True" |
| CommandBehavior:MouseUp.Command="{Binding MouseUpCommand}"> |
| <telerikGrid:RadGridView.Columns> |
| <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding Test1}" |
| Header="Test1" /> |
| <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding Test2}" |
| Header="Test2"/> |
| <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding Test3}" |
| Header="Test3"/> |
| <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding Test4}" |
| Header="Test4"/> |
| <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding Test5}" |
| Header="Test5"/> |
| </telerikGrid:RadGridView.Columns> |
| </telerikGrid:RadGridView> |
(replaced some variables with dummy data)
