How to insert multiple rows of datagridview in Windows form
How to insert multiple rows of datagridview in Windows form application
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Karthik ElumalaiRank #544 · 4.5K reputationPosted Jun 22, 2016, 6:37 PM EDT
Vasanth NatarajanRank #3,352 · 429 reputationPosted Jun 22, 2016, 11:47 PM EDT
using (con = new SqlCeConnection(Properties.Settings.Default.DataConnectionString)) { con.Open(); // open the DB Connection using (SqlCeDataAdapter cmd = new SqlCeDataAdapter("SELECT * FROM Animals", c)) //Cerate the dataAdopter { DataTable dt = new DataTable(); cmd.Fill(dt); dataGridView.DataSource = dt; } }