I am needing to apply celltemplateselectors at runtime to dynamic grid columns from observablecollection<T>.
Do you have any documentation or examples that show applying celltemplateselectors to grid columns in code behind purely?
I have DataTemplates in a Resource Dictionary and I would like to use the business object value in the cell to decide the datatemplate to select.
Example:
Do you have any documentation or examples that show applying celltemplateselectors to grid columns in code behind purely?
I have DataTemplates in a Resource Dictionary and I would like to use the business object value in the cell to decide the datatemplate to select.
Example:
private void grid_AutoGeneratingColumn(object sender, GridViewAutoGeneratingColumnEventArgs e) { if (e.Column.UniqueName.Equals("SpecificColumn", StringComparison.CurrentCultureIgnoreCase)) { e.Column.CellTemplateSelector = // ... point to C# class that returns datatemplate from resource dictionary file
} }