您好,请参照
- this._gcMultiRow.CellValidating += (s, e) =>
- {
- var gcMultiRow = s as GcMultiRow;
- if (gcMultiRow == null || gcMultiRow.EditingControl == null)
- {
- return;
- }
-
- var currentValue = gcMultiRow.EditingControl.Text;
- int result;
- if (int.TryParse(currentValue, out result))
- {
- if (result > 10)
- {
- gcMultiRow.EditingControl.Text = "0";
- }
- }
- };
复制代码 |