i have a problem with the winform radgrid.
Trying to add columns runtime with the following loop:
public void CreateGridProductieMonitor(List<string> Kolommen)
{
radGridViewProductie.DataSource = schrapViewBindingSource;
foreach (string Kol in Kolommen)
{
if (!string.IsNullOrEmpty(Kol.Trim()))
{
GridViewTextBoxColumn textBoxColumn = new GridViewTextBoxColumn();
textBoxColumn.UniqueName = Kol;
textBoxColumn.HeaderText = Kol;
textBoxColumn.FieldName = Kol;
radGridViewProductie.MasterGridViewTemplate.Columns.Add(textBoxColumn);
}
}
}
The datasource of the grid is a generic list. The fieldname is 100% correct.
Only the first column shows data. The other columns are empty. When i change the order of the columns the result is the same. The first column added shows data.
I tried adding the columns before and after binding to the datasource.
Greetings Tim