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
4341
XamDataGrid EditModeModing Event Issue
posted

We are using WPF infragistics version 2014.2.

We are facing an issue while working on the XamDatagrid. In our application we have two grids (parent and its child). Based on the record selected in the parent grid the child grid is loaded. In the parent grid we can add new records or edit the existing records. However before performing committing the record we need to perform few validations. Following are the validations that we need on the parent grid.

- The name column of the parent grid is compulsory, so it cannot be blank.
- Also the name should not be duplicate.

We have used the "EditModeEnding" event to perform these validation checks. However we found that when the user either adds duplicate name or makes the cell blank; and then if he clicks on the child grid, though the validations are performed and the message box is displayed still the parent grid’s row is committed.

As per our requirement we want that when the validation fails the focus should be set on the parent grid’s column until the user rectifies the value. We have attached herewith a test application with the sample code that we are using to perform these validation. You test the above mentioned issue with the “Module Issue” tab of the test application. Please let us know is there any way we can restrict the user and set the focus back on the parent grid’s cell till the validations checks are successful.

DependentGridInTab.zip