Hi,
we are using the ClickAction "EnterEditModeIfAllowed" in our grid implementation. Now we want to use the "SelectedItemsChanged"
event to realize when the user select another row/dataItem. We need this to ask the user if her want to save the changed item.
We know that when "EnterEditModeIfAllowed" is set, the "SelectedItemsChanged" event isn't thrown. To achieve this we are using this workaround:
private void XamDataGridExt_EditModeStarting(object sender, EditModeStartingEventArgs e) { e.Cell.IsSelected = true; }
Now the "SelectedItemsChanged" is thrown but it is thrown two times. In the first call "SelectedItems" is empty and in the second call the "SelectedItems" is the new selected Item. In this case we can't realize if the user select an another row or its the same row. It is also thrown wenn another cell in the same row is selected.
In short: Can we get a event when the user select another row and when using "EnterEditModeIfAllowed" ?
Best regards
Lukas
Hello Mike,
the RecordDeactivating event works perfectly for our purposes.
Thank you very much
Hello Lukas,
Thank you for contacting Infragistics!
When you enter edit mode while clicking a cell it doesn’t select the row this is why the SelectedItemsChanged event doesn’t fire. Instead I recommend you handle the RecordActivated event. This will only fire when you click on a new row, so you won’t have it firing when you click on a different cell within the same row/record.