Posted 22 October 2024, 8:12 am EST
In a .NET WinForms application with C1.Win.C1TrueDBGrid (4.8.20241.672) I have a trivial BeforeColUpdate event handler that just always sets the e.OldValue to “x”.
private void c1TrueDBGrid1_BeforeColUpdate(object sender, C1.Win.C1TrueDBGrid.BeforeColUpdateEventArgs e)
{
e.OldValue = "x";
}
When I run the application and edit any cell to write any text, pressing enter (or use any other means to commit the changes) for the first time changes the text to “x”. The second time I edit text in the very same cell (showing “x” before editing), it will accept the new value I type in. The next time it’s overriden with “x” again, then isn’t, and so on.
Is this behavior expected? Is there a way to ensure any value user typed is always overridden in the BeforeColUpdate event?