MSSQL data source

Data Grid View doesn’t show any data from MSSQL data source

 

 

You need to call after setting the DataSource

dataGridView1.AutoGenerateColumns = true;
dataGridView1.DataSource = myDataSet.DefaultViewManager;
dataGridView1.DataBind();

EDIT

  dataGridView1.DataSource = myDataSet.Tables[0];
  dataGridView1.AutoGenerateColumns = true;

LEAVE A REPLY

Please enter your comment!
Please enter your name here