C
C#2y ago
novaaa

❔ VISUAL STUDIO C# DATABASE AND LISTBOX

I am currently working on my assignment and am stuck on this issue Where I have a Database to fetch data from and I am unsure how do i proceed. (Picture 1) I am stuck here and unsure how do i get the data from (Picture 2) I need the Data "Chinese", "English", "Mathematics" to be added into a ListBox But i have no idea how do i get to the value after (Picture 1)
2 Replies
novaaa
novaaaOP2y ago
When dealing with adding to DataGridView i used the following
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
dgv.DataSource = dt;
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
dgv.DataSource = dt;
Figured it out Use foreach dt row
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server