I have this requirement in asp.net 3.5 web form. (Actually I am coding an Application Page for Sharepoint 2010)
- Allow users to click Add button to add new Student to a students list.
- Allow users to click Delete button to remove specific row from the students list.
- Allow users to edit users in the list.(rows should always be in edit mode)
- Allow users to click a submit button to save all the data.(only one submit button for the list)
- I wish to bind the control with a list data like
List<Student> students
- The edit form for each student will be complex, there will be multiple DropDownList etc.
What is the best way to implement such requirement? I have researched Asp.net ListView, Repeater, GridView, thought this was an easy task but found none of them are easy to be implemented.
- ListView cannot retrieve the data easily, seems you have to find each control programmatically
- Repeater is meant to show readonly data.
- GriView displays data in a table format, which is not what I need.
Maybe I am missing something? Much thanks!
Ignore all asp.net controls, use jQuery or other JS library to implement the table or grid operations(load data, add row, edit row, delete row). When click submit button, submit the JSON object to server, and server can deserialize the JSON string to Student List.