Hi,
When the user selects a row in my grid, I perform some action.
When the row is already selected and the user clicks on it again, nothing happens because the row is already selected.
Is there any event or something that I could pick up? I didn't see any "row clicked" event available.
I could hack something on the cell but I'd rather use the built-in features of the grid.
Cheers.
Hello,
If you are not using RowSelectors, then ActiveCellChange is the workaround, which you already have done it. There is no other event to be raised in those circumstances (when a record is already selected).
Thank you,
Sam
I don't show the row selectors so the user can't click on them.
That wouldn't solve my issue as the grid spans horizontally in a scrollviewer and the user would then have to scroll back all the way to the left to be able to click on the row selector.
I had to cancel the cell activation because the clicked cell would "jump" at the center of the grid and hide the left part if the user clicked on the right-hand side.
I attached a printscreen of the grid so that you can see what it looks like. If the user click on a cell from the "Etat" column then that columns moves to the left and hides the first columns.
When the row is selected by row selector (on the left), RowSelectorClicked event gets raised, and if the user clicks on the row selector again, the event should fire again regardless of the row being selected unless the user clicked on a cell of the same row instead of the row selector. That would be different.
How are you selecting the row second time when the row is already selected?
I hooked up the ActiveCellChanged event and check if the active cell is on the same row as the currently selected row.
If it is I clear the selection from the bound ICollectionView and set it back to the same item. That fires the CurrentItemChanged as if the row was initialy selected.
A bit ugly but it works fine.