dev gridcontrol 两张表关联嵌套时,如何编辑detail的数据 10
如图,假设想双击催款记录一条数据,有什么事件没有?或者detail里行可以添加button,点击进行编辑是展开后,要编辑DETAIL数据...
如图,假设想双击催款记录一条数据,有什么事件没有? 或者detail 里行可以添加button ,点击进行编辑
是展开后,要编辑DETAIL数据 展开
是展开后,要编辑DETAIL数据 展开
1个回答
2015-08-26
展开全部
对主表的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();
}
希望对你有用 ;}
追问
不是 这个意图
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询