protected override void PopulateTabMasterData(DevExpress.XtraGrid.Tab.ViewTab tabControl, int rowHandle) { tabControl.HeaderLocation = DetailTabHeaderLocation; GridDetailInfo[] details = GetDetailInfo(rowHandle, false); if (details == null) { return; } int vIndex = GetVisibleDetailRelationIndex(rowHandle); foreach (GridDetailInfo detail in details) { if (!OptionsDetail.AllowExpandEmptyDetails && IsMasterRowEmptyEx(rowHandle, detail.RelationIndex)) { continue; } int detailRows = DataController.GetDetailList(rowHandle, detail.RelationIndex).Count; bool exp = vIndex == detail.RelationIndex; DetailTabStyleEventArgs e = new DetailTabStyleEventArgs(rowHandle, detail.RelationName, detail.RelationIndex, true); RaiseDetailTabStyle(e); if (e.Enabled) { CreateEnableTabPage(exp, tabControl, detail); } else { CreateDisableTabPage(exp, tabControl, detail); } } }
internal void RaiseDetailTabStyle(DetailTabStyleEventArgs e) { if (DetailTabStyle != null) { DetailTabStyle(this, e); } }
private void myGridView1_DetailTabStyle(object sender, DetailTabStyleEventArgs e) { if (e.RowHandle % 2 == 0 && e.RelationIndex == 1) { e.Enabled = false; } }