dgv1.Rows.Add(txtname.text,txtAge.Text,txtGender.text) it underline Add with red what could be the problem
Add data to data grid
6 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
ali tuncerRank #1,499 · 1.1K reputationPosted Apr 12, 2016, 2:36 AM EDT
parameters are wrong, try this way:
dgv1.Rows.Add(testrow);
Carlos kambuiRank #2,642 · 528 reputationPosted Apr 12, 2016, 2:52 AM EDT
ali tuncerRank #1,499 · 1.1K reputationPosted Apr 12, 2016, 2:58 AM EDT
Carlos kambuiRank #2,642 · 528 reputationPosted Apr 12, 2016, 3:20 AM EDT
Vincent Maverick DuranoRank #238 · 10.3K reputationPosted Apr 12, 2016, 10:08 AM EDT
ali tuncerRank #1,499 · 1.1K reputationPosted Apr 12, 2016, 5:45 PM EDT
Vincent is right, I thought you were using DataGrid control in Winforms..