lauriemc Posted February 21, 2007 Posted February 21, 2007 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 ? Quote
Administrators PlausiblyDamp Posted February 21, 2007 Administrators Posted February 21, 2007 Me.dgFile.CaptionText = sptable & " Table" Me.dgFile.DataSource = ds.Tables(</pre><table name or number>) Me.dgFile.Show() </ Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.