DevExpress GridControl显示主从表数据(Master/Detail)
DevExpress GridControl显示主从表数据(Master/Detail)
DevExpress GridControl显示主从表数据(Master/Detail)
GridControl 添加Detail Level
设置主从表关联
C# 全选
this.gvDetail.ViewCaption = "报工明细";
this.gvDetail.OptionsView.ShowGroupPanel = false;
this.gcSummary.LevelTree.Nodes[0].RelationName = nameof(res_ProductionRegProgressMaster.Details);
//设置蓝色标题背景色
foreach (GridColumn col in gvDetail.Columns)
{
col.AppearanceHeader.BackColor = System.Drawing.Color.DeepSkyBlue;
}
绑定表格数据源
C# 全选
List<res_ProductionRegProgressMaster> data = _BLL.QueryProgress(input);
gcSummary.DataSource = data; //绑定主表的Grid
模型定义
版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
NewDoc C/S框架网