dev gridcontrol CardView 如何禁止折叠 100
2015-09-29
展开全部
对主表的MasterRowExpanded事件编程。代码大致如下:
void gridView_MasterRowExpanded(object sender, CustomMasterRowEventArgs e)
{
GridView gridViewMaster = sender as GridView;
GridView gridViewDetail = gridViewMaster.GetDetailView(e.RowHandle, e.RelationIndex) as GridView;
gridViewDetail.BeginUpdate();
gridViewDetail.Columns["BomDetailNoID"].Visible = false;
gridViewDetail.Columns["BomDetailNoID"].OptionsColumn.ShowInCustomizationForm = false;
gridViewDetail.EndUpdate();
}
希望对你有用 ;}
void gridView_MasterRowExpanded(object sender, CustomMasterRowEventArgs e)
{
GridView gridViewMaster = sender as GridView;
GridView gridViewDetail = gridViewMaster.GetDetailView(e.RowHandle, e.RelationIndex) as GridView;
gridViewDetail.BeginUpdate();
gridViewDetail.Columns["BomDetailNoID"].Visible = false;
gridViewDetail.Columns["BomDetailNoID"].OptionsColumn.ShowInCustomizationForm = false;
gridViewDetail.EndUpdate();
}
希望对你有用 ;}
追问
谢谢!这个是对主从表显示的设置吧 我需要的是CardView模式下 如何禁用Card的折叠按钮。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询