1
Look for articles in this web site.
Look at the samples in the MSDN.
Generate a Windows Forms application and put a DataGridView in the form. Then look at the Designer.cs file for the form; you will have a useful sample.
0
Hi,
Follwing way we can create DataGridView dynamicaly,
string query = "select * from Customer";
sqlConnection.Open();
sqlCommand = new SqlCommand(query, sqlConnection);
da = new SqlDataAdapter(sqlCommand);
ds = new DataSet();
da.Fill(ds);
DataGridView myDataGrid = new DataGridView();
myDataGrid.DataSource = ds.Tables[0];
myDataGrid.Show();
panel1.Controls.Add(myDataGrid);
Hope this will help you.
Thanks.