void PropertyGridView_CellFormatting(object sender, GridCellFormatEventArgs e) { PropertyPOCO poco = e.Item as PropertyPOCO; if (poco != null) { if (poco.Group) { if (e.Font != null) { e.Font = new Font(e.Font.FamilyName, e.Font.Size, FontStyle.Bold); } e.BackgroundColor = Colors.LightGrey; if (e.Column.DataCell.GetType() == typeof(PropertyCustomCheckCell)) { PropertyCustomCheckCell cell = e.Column.DataCell as PropertyCustomCheckCell; if (cell != null) { CheckBox checkBox = cell.checkBox as CheckBox; if (checkBox != null) { checkBox.Visible = false; } } } } else { if (e.Font != null) { e.Font = new Font(e.Font.FamilyName, e.Font.Size, FontStyle.None); } if (e.Column.DataCell.GetType() == typeof(PropertyCustomCheckCell)) { PropertyCustomCheckCell cell = e.Column.DataCell as PropertyCustomCheckCell; if (cell != null) { CheckBox checkBox = cell.checkBox as CheckBox; if (checkBox != null) { checkBox.Visible = true; } } } } } }
void PropertyGridView_CellFormatting(object sender, GridCellFormatEventArgs e) { PropertyPOCO poco = e.Item as PropertyPOCO; if (poco != null) { if (poco.Group) { if (e.Font != null) { e.Font = new Font(e.Font.FamilyName, e.Font.Size, FontStyle.Bold); } e.BackgroundColor = Colors.LightGrey; } else { if (e.Font != null) { e.Font = new Font(e.Font.FamilyName, e.Font.Size, FontStyle.None); } } } }