public Form1() { InitializeComponent(); SqlConnection con = new SqlConnection(@"Server= DESKTOP-AK4NH6J\SQLEXPRESS;Database=Interview;Trusted_connection=True"); con.Open(); SqlCommand cmd = new SqlCommand("select * from Person", con); SqlDataAdapter da = new SqlDataAdapter(cmd); DataTable dt = new DataTable(); da.Fill(dt); dt.Columns.Add("Edit", typeof(string)); con.Close(); dataGridView1.DataSource = dt; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)