I am a newbie to MVC3...
I am trying to display a grid (3 columns) that contains list of students (in column1) with checkboxes in columns 2 & 3. The header of those columns are in order: student Name, Seminar1 & Seminar 2
. The checboxes will represent if the student attended each seminar.
The two pieces of info (student & seminar) are coming from unconnected tables in the db. So, I am thinking of this approach:
- Create a datatable in the controller.
- Make it a property in a model class
- Display it in the webgrid in the view
At the end I want to be able to display the checkboxes with the proper values, trap their CHECKED events and preferably make it all ajaxable
Am I violating any rules if I do that view-related effort in the controller? If I shouldn't how would I do it in the Webgrid? How would you approach it?
Thanks