1.主从表隐藏表格展开按钮。
当主表内容不包含子表时候隐藏,主从表加号图标。效果如下图。
实现代码
private void gvMain_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e)
{
if (gvMain.IsMasterRowEmpty(e.RowHandle) == true && e.Column.VisibleIndex == )
{
var ce = ((DevExpress.XtraGrid.Views.Grid.ViewInfo.GridCellInfo)(e.Cell));
ce.CellButtonRect = Rectangle.FromLTRB(, , , );
}
}