jazz__man
asked on
Working with a DataGridView programmatically - creating and binding to a datasource in code - not working??
Hi I am trying to create a DataGridView in code, not for display purposes but as a temporary holder for exporting to excel - but when I go to export from the DataGridView it does not contain any data. Any ideas? I have checked and the business object has data but it is just not being assigned to the DataGridView.
Your help would be appreciated.
Dim dgv As New DataGridView
dgv.AutoGenerateColumns = True
dgv.DataSource = MyBusinessObject
Your help would be appreciated.
Dim dgv As New DataGridView
dgv.AutoGenerateColumns = True
dgv.DataSource = MyBusinessObject
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, thats probably the best way forward.
Based on the 3 lines of code, it seems you are not binding the data to the gridview :-)