找到GridView的CellEditorInitalize事件。
protected void agv_main_CellEditorInitialize(object sender, ASPxGridViewEditorEventArgs e) { if (e.Column.Grid.IsNewRowEditing //新增时 && e.Column.Name.Equals("SIGNTYPE", StringComparison.OrdinalIgnoreCase) //确定列 ) { e.Editor.ReadOnly = true; } }
时间: 2024-11-09 00:52:36