View Single Post
  #1 (permalink)  
Old July 15th, 2015, 11:23 AM
Deaf Smith Deaf Smith is offline
Authorized User
Points: 50, Level: 1
Points: 50, Level: 1 Points: 50, Level: 1 Points: 50, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2012
Location: Texas!!
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default DataGrid loading using Postgresql

After executing a SQL instruction and then loading the results into a table I find the dataGridView1 won't load.

I am SURE the data was put into the table as I displayed it after it had loaded the data


Code:
                dtable.AcceptChanges();
                MessageBox.Show("Row one had " + drow[0] + " " + drow[1] + " " + drow[2] + " " + drow[3] + " " + drow[4]");
               dataGridView1.AutoGenerateColumns = true;
                // set the gridview to the datatable..
                dataGridView1.DataSource = dtable;
               // dataGridView1.DataBind();   <-- this command gives errors.
The MessageBox did display the data, so it is there.

So once I get the DataSource for the gridview set to the table
how do I get the GridView to bind the data?

I use Devart.Data.PostgreSql if that matters.

Thanks.

Last edited by Deaf Smith; July 15th, 2015 at 11:25 AM..
Reply With Quote