I have a datagrid which contains 750 columns. When I try to assign it to datasource, I get the following error

An unhandled exception of type 'System.InvalidOperationException' occurred in System.Windows.Forms.dll

Additional information: Sum of the columns' FillWeight values cannot exceed 65535.



My code is as follows

Public TaView As DataView
Dim table As DataTable = New DataTable

for i = 0 to 750
table.Columns.Add(i.ToString())
Next

frmDatagrid.TaView = New DataView(table)
frmDatagrid.dataView.DataSource = frmDatagrid.TaView 'The crash happens here


I think I need to SetWeight to 1 for all columns. But how can it be done before assigning to datasource.