开发者

Restore oryginal value after validation fails - infragistics UltraWinGrid

开发者 https://www.devze.com 2023-02-13 07:25 出处:网络
I\'ve set RegexpPattern property in Infragistics UltraWinGrid column and it works - when user edit cell and given input doesn\'t match regexp cell is开发者_C百科 cleared. I would like to restore previ

I've set RegexpPattern property in Infragistics UltraWinGrid column and it works - when user edit cell and given input doesn't match regexp cell is开发者_C百科 cleared. I would like to restore previous ( before edit started) value of cell instead of make it blank. How can I do it?

thanks in advance!


I found solution:

Create event handler for grid's event: CellDataError - set event argument properties as in following sample:

private void _ultraGrid_ConfigList_CellDataError(object sender, Infragistics.Win.UltraWinGrid.CellDataErrorEventArgs e)
{
     e.StayInEditMode = false;
     e.RaiseErrorEvent = false;
     e.RestoreOriginalValue = true;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消