展开全部
对主表的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();
}
希望对你有用 ;}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询