Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

DataGrid won't load with sql (using Postgresql to read the data)

$
0
0

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

I use WinForms with Visual Studio 2013.

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



      dtable.AcceptChanges();

      MessageBox.Show("Row one had " + drow[0] + " " + drow[1] + " " + drow[2] + " " + drow[3];

   // set the gridview to the datatable..
      dataGridView1.DataSource = dtable;
   // dataGridView1.DataBind();   <-- this command gives errors.
      cn.Clone();  


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.

Viewing all articles
Browse latest Browse all 2535

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>