forum

Home / DeveloperSection / Forums / Binding data with DataGridView

Binding data with DataGridView

John Smith331229-Sep-2010
Please let me know where I am wrong

Here binding data with datagridview control in C#

 SqlConnection con = new SqlConnection("server=****\\sqlexpress; uid=sa; password=sa; database=****");             con.Open();
            SqlDataAdapter ada = new SqlDataAdapter("select * from tableName", con);
            DataTable dt = new DataTable();
            ada.Fill(dt);
            dataGridView1.DataSource = adaa;


Updated on 30-Sep-2010
I am best.

Can you answer this question?


Answer

2 Answers

Liked By