-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add click event for row- Datagrid #2388
Comments
Hi @Kath118, can you create a uservoice request for the issue and add it to your comment? Thanks! |
A RowPressed and ColumnHeaderPressed event would be very useful for the DataGrid. I need both of these and it's requiring some ugly hacks to get this functionality. RowPressed should allow detection of both Left and Right mouse button for context menus. DoublePressed would be a bonus. ColumnHeaderPressed should also allow Left and Right press for context menus. Not sure how to prioritize Left press over Sorting event. |
How would this be different from the SelectionChanged event? |
There are many standard use cases that SelectionChanged doesn't support. For example: right click of a row in the table to show a context menu. Also double clicking a row to open it up in an editor. SelectionChanged is conceptually different and has different use cases than a Pressed/Click event. I think ListViewBase supports ItemClick for reference. Right now I have to implement something like what is below. Usable but it should be out-of-the-box functionality of the DataGrid in my opinion.
There is then a lot of additional code to track double press and get the index of the DataGridRow and correlate it back into the ItemsSource element so it can be selected, etc. All of this said, ColumnHeaderPressed is even more useful to implement filtering Flyouts and other controls to edit the columns. I still haven't found a good way to do this one. |
Duplicate of #2249 |
Glad to see that some attention is being paid to this. ;) |
This issue seems inactive. It will automatically be closed in 14 days if there is no activity. |
2 similar comments
This issue seems inactive. It will automatically be closed in 14 days if there is no activity. |
This issue seems inactive. It will automatically be closed in 14 days if there is no activity. |
Issue is inactive. It was automatically closed. |
@harinikmsft , @nmetulev Why are issues like this being automatically closed? I understand wanting to avoid permanently open items but these types of things must not just be shutdown automatically. Please change the system from auto-closing these and please reopen this issue. |
I'm submitting a...
New Feature
Please add a click event for row in datagrid.
The selection changed event does not work when is necessary to open a new page.
Because to select the same row is necessary select another row and then re-select the previous row.
The text was updated successfully, but these errors were encountered: