Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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 ?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...