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
130
How to find the row index of a modified cell in the XamGrid ?
posted

We have an MVVM application which uses a XamGrid (v12.1) bound to a BindingList. When a cell in the XamGrid is modified, the View needs to notify the row index of the modified cell to the View Model. For this, I used the CellExitedEditMode event to get the row index as follows:

void OnCellExitedEditMode(object sender, CellExitedEditingEventArgs e)

{     int rowIndex = e.Cell.Row.Index;  }

The above code stops working after the user performs a sort operation. After the XamGrid is sorted, the row index obtained using the method above is not the same as the row index from the BindingList. 

How can I get the correct row index of the cell that was changed by the user ?