Hi, I wrote validation function to validate WinGrid values. When there is any invalid value, I set up RowError and SetColumnError. The error icon showed up correctly. However, after I corrected the value, the error icon is still there. How can I remove the error icon on column and row when cell value is valid? thanks.
If you applied an error to the data source, then you just need to clear the error. If I recall correctly, the way to do is on the DataSet/DataTable is to call SetColmunError and pass in null.
Thanks Mike for your quick reply. Yes. SetColumnError to null works fine to clear the error icon in a cell. I have mulitiple errors for a row. How do I clear the row error for the special cell? When I call ClearErrors in following code, all errors are cleaned up. Is there any example/link to deal this kind of request? Thanks
private void ClearRowError(UltraGridCell cell)
{
DataRowView
drv = (DataRowView)cell.Row.ListObject;
drv.Row.SetColumnError(cell.Column.Key,
null);
drv.Row.ClearErrors();
}
Hi,
What do you mean by "special cell?" You mean the RowSelectors?
I would think clear the errors on the row should do it. If that's not working, it sounds like it's a bug in the grid. In fact, I think I vaguely recall fixing this a long time ago. What version of the controls are you using?
Maybe you just need the latest service release.
How to get the latest service release - Infragistics Community
If that doesn't help, maybe you can work around it by dirtying the grid elements after you clear the errors:
this.ultraGrid1.DisplayLayout.UIElement.DirtyChildElements();