dev 从表处理
从表列名,从表选中行和主表选中一样,var selectrow = detailView.GetRow(detailView.FocusedRowHandle) as obj;
private void gridView1_MasterRowExpanded(object sender, DevExpress.XtraGrid.Views.Grid.CustomMasterRowEventArgs e) { detailView = gridView1.GetDetailView(e.RowHandle, e.RelationIndex) as DevExpress.XtraGrid.Views.Grid.GridView; if (detailView != null) { //detailView.CustomDrawRowIndicator += gridView1_CustomDrawRowIndicator; //detailView.Columns["Name"].Caption = "姓名"; //detailView.Columns["No"].Caption = "编码"; detailView.RowCellStyle += gridView1_RowCellStyle; //detailView.GroupPanelText = "明细喂喂喂"; //detailView.ChildGridLevelName = "明细喂喂喂"; //detailView.VertScrollTipFieldName = "明细喂喂喂"; //detailView.ViewCaption = "明细喂喂喂"; //detailView就是子View。设置VID 列为隐藏 detailView.BestFitColumns(); } }