You should be able to do something like this, creating semi dynamic datagrids, by creating an object for every commit of a number of records. So the first 5 creates 1 commitobject that is associated with the 5 student records, the second commitobject is associated with the 3 studentobjects. Then show a listview for the commitobjects that have a nested datagrid with the students over the association with the commit objects. That way you’ll get a list of commitobjects with the datagrids of the students with the different lists.
Not completely sure if this will cover your requirement fully though, but this is a possible solution based on the somewhat limited info in the question.