|
-
September 28th, 2011, 10:26 PM
#1
FillWeight values cannot exceed 65535.
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|