Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
700
Using SelectedItemsChanged with EnterEditModeIfAllowed
posted

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