S
Steven Pasetti
Guest
Is there any way to set the FillWeight property of a column in a DataGridView to 0 instead of its default 100 at the time of binding? The reason is I have a DataTable in a DataSet with an unusually large number of columns that Im trying to bind to a DataGridView. Im getting the error message:
InvalidOperationException: Sum of the columns FillWeight values cannot exceed 65535.
This is happening on the .DataSource assignment.
Because the FillWeight property is by default set to 100.0 for each column, this limits me to binding to a DataTable of no more than 655 columns. This is unacceptable for my needs.
It should also be noted that I have AutoSizeColumnsMode set to None on the DataGridView, so changing FillWeight to 0 should not be an issue.
Anyone have any ideas?
Thanks,
Steve
Continue reading...
InvalidOperationException: Sum of the columns FillWeight values cannot exceed 65535.
This is happening on the .DataSource assignment.
Because the FillWeight property is by default set to 100.0 for each column, this limits me to binding to a DataTable of no more than 655 columns. This is unacceptable for my needs.
It should also be noted that I have AutoSizeColumnsMode set to None on the DataGridView, so changing FillWeight to 0 should not be an issue.
Anyone have any ideas?
Thanks,
Steve
Continue reading...