Hello,
In my MainForm, I have added multiple columns to the Grid as follows:
string[] columnNames = { "Name", "Age", "Gender", "Country" };
columnNames.ForEach(columnName =>
{
iGridView1.Cols.Add(columnName);
});
and in another class, I have a DataTable,
var table = new DataTable();
table.Columns.Add("Name");
table.Columns.Add("Age");
table.Columns.Add("Gender");
table.Columns.Add("Country");
However, when I attempt to call
iGridView1.FillWithData(table, true);
to keep the current col set, the Grid doesn't populate, but when it's false, it works.
When it's set to false, the grid gets populated with the same amount of rows, but the data are blank.
The addition of the columns on datatable is just for formality.
How do I achieve that?
Edited by user
2022-11-29T18:18:00Z
|
Reason: Not specified