Posted 6 March 2025, 6:10 pm EST
I need to add columns manually:
Columns.Add(new GridColumn()
{
ColumnName = Name,
IsReadOnly = !Allow,
Header = Name,
HeaderHorizontalAlignment = LayoutAlignment.Center,
Background = ColorRow(Columns.Count)
});
However, the grid itself will be bound to a model, so how do I speicfy the binding name when adding a column?
For some other grids I am trying, they use something like Map = somestring
Basically I need to programmatically do the equivalent of this xaml code:
<c1:GridColumn Binding=“FirstName” />