C# – Datagridview column limit

c++datagridviewwinforms

I have a datagridview table that I need to display some data in. In certain instances, I exceed the column number limit and get the following error:

Sum of the columns' FillWeight values cannot exceed 65535

Is there any other tool that I could use to overcome this constraint?

Best Solution

Open a grid event columnAdded.

private void dataGridViewName_ColumnAdded(object sender, DataGridViewColumnEventArgs e)
{
    e.Column.FillWeight = 10;    // <<this line will help you
}