problem with vb datagrid

lauriemc

Freshman
Joined
Feb 2, 2007
Messages
26
This is probably a very base question. I have a datagrid that's source is a SQL Server table. This is written in vb.net, my code is very simple as follows:

Me.dgFile.CaptionText = sptable & " Table"
Me.dgFile.DataSource = ds
Me.dgFile.Show()

My problem is that while it displays, it doesn't initially display the grid with the data. It's an empty grid, I click on the plus sign by the right arrow, then click on the table name. Then the table displays. Okay, fine, but I hate those two extra steps.

As long as I am using the same table, it won't take me through the gyrations each subsequent time I open it. However, I switch back and forth between tables.

So.... how do I get it to display immediately with the data instead of the empty grid with + sign ?
 
Back
Top