DataGridView + Adding Rows

Biodegradabl

New member
Joined
Jan 16, 2007
Messages
1
Programming Experience
1-3
Hey all I am trying to add Data in rows using a loop, but I can't figure out how to add just the right amount of rows so it doesn't glitch on me...
http://rafb.net/p/r1ITE288.html
that is my code
UserClassAndStudent() is my array that holds all the variables. that are seperated by my delimter "|" vertical bar. and example value of UserClassAndStudent would be
(0)=Class 1|Student 1|Student 2|Student 3
(1)=Class 2|Student 1b|Student 2b|Student 3b
(2)=Class 3|Student 1c|Student 2c|Student 3c
(3)=

Where Class 1,2,3 would be the header and everything else will be the row for that column, lastly the amount of rows in each column vary by number of students etc....
 
to add rows to a dgv, you add them to the underlying data source, i.e. datatable, that the dgv is showing.. there are a few tthreads about how to add rows to datatables; have a search. If you get stuck, feel free to come back!
 
Back
Top