dev gridview表格按钮,按行设置名称
作者:互联网
设置表格CustomDrawCell事件,在表格事件里处理
private void gridView1_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e) { if (e.Column.Name == "gcoperation")//操作 { var row = gridView1.GetRow(e.RowHandle) as SystemConfigModel; if (row != null) { var but = (DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit)e.Column.ColumnEdit; if (row.disabled.ToString() == "禁用") { but.Buttons[1].Caption = "启用"; } else { but.Buttons[1].Caption = "禁用"; } } } }
标签:gridview,CustomDrawCell,表格,Column,but,按行,var,dev,row 来源: https://www.cnblogs.com/shuaimeng/p/15523419.html