extnet cellediting 清空编辑器的值
要清空Ext.NET的CellEditing编辑器的值,可以使用如下代码:
// 获取CellEditing编辑器
var editor = grid.GetCellEditingPlugin().GetEditor(column);
// 清空编辑器的值
editor.SetValue(null);
这里的grid是你的GridPanel组件,column是你要清空值的列。
如果你想清空整个GridPanel中所有行的编辑器值,可以使用如下代码:
// 获取CellEditing编辑器
var editor = grid.GetCellEditingPlugin().GetEditor(column);
// 遍历GridPanel中的所有行
foreach (var row in grid.GetStore().GetRange())
{
// 清空每行的编辑器值
editor.SetValue(null);
}
这样就可以清空GridPanel中所有行的编辑器值了。
原文地址: https://www.cveoy.top/t/topic/iKh0 著作权归作者所有。请勿转载和采集!