T
Tim Van Wassenhove
When i run the code below i recieve the following error message:
At least one of the DataGridView control's columns has no cell template.
---------------------------------------------------------------------------------
this.dataGridView1.Columns.Clear();
DataGridViewColumn[] columns = new DataGridViewColumn[750];
for ( int i = 0; i < columns.Length; ++i )
{
DataGridViewColumn column = new DataGridViewColumn();
column.CellTemplate = new DataGridViewTextBoxCell();
column.Width = 30;
column.FillWeight = 1;
columns = column;
// adding them one by one works
//this.dataGridView1.Columns.Add( column );
}
this.dataGridView1.Columns.AddRange( columns );
----------------------------------------------------------------------------------
Anyone that knows how i can speed up the addition of this many columns?
I've been experimenting with suspend/resume layout and toggling Visible property but none
of them seem to be make a significant difference.
Thanks in advance.
At least one of the DataGridView control's columns has no cell template.
---------------------------------------------------------------------------------
this.dataGridView1.Columns.Clear();
DataGridViewColumn[] columns = new DataGridViewColumn[750];
for ( int i = 0; i < columns.Length; ++i )
{
DataGridViewColumn column = new DataGridViewColumn();
column.CellTemplate = new DataGridViewTextBoxCell();
column.Width = 30;
column.FillWeight = 1;
columns = column;
// adding them one by one works
//this.dataGridView1.Columns.Add( column );
}
this.dataGridView1.Columns.AddRange( columns );
----------------------------------------------------------------------------------
Anyone that knows how i can speed up the addition of this many columns?
I've been experimenting with suspend/resume layout and toggling Visible property but none
of them seem to be make a significant difference.
Thanks in advance.