Populating a Data Grid with Array Data
Posted: Fri Aug 05, 2011 9:11 am
I have been unable to figure out how to get data from an array into a data grid. The array consists of 18 "records". There are 18 keys, each being a student's name. For each student (key) there are 5 elements (scores). I can look at the variable list for the array and it can be expanded to show the student names (keys) and each of those can be expanded to show the 5 scores (elements) for each, so I know the array works. Each element is named and the names appear perfectly, along with their values (scores) in the variable listing.
I have a created data grid that consists of 18 rows and 7 columns. The columns are all named. The first column is "Name" and I would like to populate each row in that column with the key (student's name). The next 5 columns are scores for different subjects (these are the named elements following each key). The last column is labeled "Total" and I would like to add up all 5 scores for the student and put the sum there.
I have been completely unable to figure out how to get the array data into the data grid. It seems like it shouldn't be so hard to do.
Any help would be most appreciated.
Colorado
I have a created data grid that consists of 18 rows and 7 columns. The columns are all named. The first column is "Name" and I would like to populate each row in that column with the key (student's name). The next 5 columns are scores for different subjects (these are the named elements following each key). The last column is labeled "Total" and I would like to add up all 5 scores for the student and put the sum there.
I have been completely unable to figure out how to get the array data into the data grid. It seems like it shouldn't be so hard to do.
Any help would be most appreciated.
Colorado