Community discussion forum

Problems with a grid control

  • 2 months ago

    Good afternoon everyone:

    I am developing an application in C # with SQLServer2005. In one of the user controls that I use to display data from different queries in one gridcontrol. When I make the first query and update the datasourse loads fine but when I do the second one shows the number of columns for the first consultation.

    What can I do to fix this problem?

    Post was edited on 11/09/2009 12:40:31 Report abuse
  • 2 months ago

    Good afternoon everyone:

    I am developing an application in C # with SQLServer2005. In one of the user controls that I use to display data from different queries in one gridcontrol. When I make the first query and update the datasourse loads fine but when I do the second one shows the number of columns for the first consultation.

    What can I do to fix this problem?

  • 2 months ago

    You should Collect All data in a Particular Data Table and upload it to a GridControl. May be These lines will help you.

    Dim dtTable As New DataTable

    ' code for collect all ur data to dtTable

    DataGridView1.Rows.Clear() DataGridView1.DataSource = Nothing DataGridView1.DataSource = dtTable

    Thanks.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Want to stay in touch with what's going on? Follow us on twitter!