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(); 
            }
        }

 

posted @ 2019-12-05 16:40  世人皆萌  阅读(292)  评论(0编辑  收藏  举报