p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   C# 2012/5.0 General Discussion (http://p2p.wrox.com/forumdisplay.php?f=714)
-   -   DataGrid loading using Postgresql (http://p2p.wrox.com/showthread.php?t=94716)

Deaf Smith July 15th, 2015 11:23 AM

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.


All times are GMT -4. The time now is 09:16 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.