I am working on this. I am learning the specifics of ES and Infragistics. For instance ES does not allow the updating of primary key fields. This requires specific handling. I will post once I have it complete.
For reference I call CheckUserCustLocationDataRow() here.
Code:
private void ultraGridUserCustLocations_BeforeRowDeactivate(object sender, System.ComponentModel.CancelEventArgs e)
{
if (!CheckUserCustLocationDataRow())
{
e.Cancel = true;
}
}
private void ultraGridUserCustLocations_Leave(object sender, EventArgs e)
{
//Currently testing this to see if this works the way I need it to.
//Clicking on another grid does not deactivate the row, but I need to check
//the row before I go to another grid, so deactivate the row from here.
ultraGridUserCustLocations.ActiveRow.Activated = false;
}
private void frmUsers_FormClosing(object sender, FormClosingEventArgs e)
{
if (!CheckUserCustLocationDataRow())
{
e.Cancel = true;
}
}