private void FillGridPat() { gridPat.BeginUpdate(); gridPat.Columns.Clear(); ODGridColumn col; col = new ODGridColumn("Field", 150); gridPat.Columns.Add(col); col = new ODGridColumn("Value", 200); gridPat.Columns.Add(col); gridPat.Rows.Clear(); _arrayPatientFields = PatFields.Refresh(_patCur.PatNum); PatFieldDefs.RefreshCache(); PatFieldL.AddPatFieldsToGrid(gridPat, _arrayPatientFields.ToList(), FieldLocations.OrthoChart); gridPat.EndUpdate(); }
private void FillGridPat() { gridPat.BeginUpdate(); gridPat.Columns.Clear(); ODGridColumn col; col = new ODGridColumn("Field", 150); gridPat.Columns.Add(col); col = new ODGridColumn("Value", 200); gridPat.Columns.Add(col); gridPat.Rows.Clear(); listPatientFields = PatFields.Refresh(PatCur.PatNum); PatFieldDefs.RefreshCache(); ODGridRow row; //define and fill rows in grid at the same time. for (int i = 0; i < PatFieldDefs.List.Length; i++) { row = new ODGridRow(); row.Cells.Add(PatFieldDefs.List[i].FieldName); for (int j = 0; j <= listPatientFields.Length; j++) { if (j == listPatientFields.Length) //no matches in the list { row.Cells.Add(""); break; } if (listPatientFields[j].FieldName == PatFieldDefs.List[i].FieldName) { if (PatFieldDefs.List[i].FieldType == PatFieldType.Checkbox) { row.Cells.Add("X"); } else { row.Cells.Add(listPatientFields[j].FieldValue); } break; } } gridPat.Rows.Add(row); } gridPat.EndUpdate(); }