private void FillGrid() { Color needsAttnCol = OpenDental.SetupWizard.GetColor(ODSetupStatus.NeedsAttention); gridMain.BeginUpdate(); gridMain.ListGridColumns.Clear(); GridColumn col; if (PrefC.HasClinicsEnabled) { col = new GridColumn(Lan.g("FormSetupWizard", "OpName"), 110); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("FormSetupWizard", "Abbrev"), 110); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("FormSetupWizard", "Clinic"), 110); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("FormSetupWizard", "ProvDentist"), 110); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("FormSetupWizard", "ProvHygienist"), 110); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("FormSetupWizard", "IsHygiene"), 60, HorizontalAlignment.Center); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("FormSetupWizard", "IsHidden"), 60, HorizontalAlignment.Center); gridMain.ListGridColumns.Add(col); } else { col = new GridColumn(Lan.g("FormSetupWizard", "OpName"), 135); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("FormSetupWizard", "Abbrev"), 120); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("FormSetupWizard", "ProvDentist"), 130); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("FormSetupWizard", "ProvHygienist"), 130); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("FormSetupWizard", "IsHygiene"), 80, HorizontalAlignment.Center); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("FormSetupWizard", "IsHidden"), 80, HorizontalAlignment.Center); gridMain.ListGridColumns.Add(col); } //col = new ODGridColumn("Clinic",120); //gridMain.Columns.Add(col); gridMain.ListGridRows.Clear(); GridRow row; bool IsAllComplete = true; if (_listOps.Count == 0) { IsAllComplete = false; } foreach (Operatory opCur in _listOps) { row = new GridRow(); row.Cells.Add(opCur.OpName); if (string.IsNullOrEmpty(opCur.OpName)) { row.Cells[row.Cells.Count - 1].ColorBackG = needsAttnCol; IsAllComplete = false; } row.Cells.Add(opCur.Abbrev); if (string.IsNullOrEmpty(opCur.Abbrev)) { row.Cells[row.Cells.Count - 1].ColorBackG = needsAttnCol; IsAllComplete = false; } if (PrefC.HasClinicsEnabled) { row.Cells.Add(Clinics.GetAbbr(opCur.ClinicNum)); } //not a required field row.Cells.Add(Providers.GetAbbr(opCur.ProvDentist)); //not a required field row.Cells.Add(Providers.GetAbbr(opCur.ProvHygienist)); //not a required field row.Cells.Add(opCur.IsHygiene ? "X" : ""); //not a required field row.Cells.Add(opCur.IsHidden ? "X" : ""); //not a required field //row = new ODGridRow(); //row.Cells.Add(opCur.OpName); //if(string.IsNullOrEmpty(opCur.OpName)) { // row.Cells[row.Cells.Count-1].CellColor=needsAttnCol; // IsAllComplete=false; //} row.Tag = opCur; gridMain.ListGridRows.Add(row); } gridMain.EndUpdate(); if (IsAllComplete) { IsDone = true; } else { IsDone = false; } }