private void Grid_Formatting_OnGenerateMetasData(int row, Item4 item, out DataGridColumn.MetaData metaData) { if (item.IsGroup) { metaData = new DataGridColumn.MetaData(); metaData.Columns[nameof(Item4.Name)] = new DataGridColumn.MetaDataColumn(Colspan: Grid_Formatting.Columns.Count) { Editor = new DataGridColumn.TextEditor() { AllowEdit = false } }; metaData.CssClasses = "group"; } else if (item.IsError) { metaData = new DataGridColumn.MetaData() { CssClasses = "background-red" }; } else { metaData = null; } }
private void Grid_UpdateSingleRow_OnGenerateMetasData(int row, Item5 item, out DataGridColumn.MetaData metaData) { if (item.Col2 % 2 == 0) { metaData = new DataGridColumn.MetaData("background-red"); } else { metaData = null; } }