Inline Editing in SharePoint 2010 (UI and Code)
Within SharePoint 2010 it is possible to enable inline editing on list items. This can be done by changing properties on a view of a SharePoint library what can be done in code and trough the user interface.
To allow inline editing trough the user interface you have to do the following:
Navigate to the list for which you want to allow inline editing:
Click on list and then list settings. On the list settings screen click on the list view you would like to edit on the bottom of the screen:
In the view screen you have a section called: Inline editing. Within that section you have a checkbox to allow inline editing:
When you have enabled this checkbox you can inline edit the items in your list:
Inline editing can also be enabled trough code. You can do this by following the code example below:
1: using(SPSite site = new SPSite("URL of the site"))
2: {
3: SPWeb web = site.RootWeb;
4: SPList list = web.Lists["Name of the list"];
5:
6: SPView view = list.Views["Title of the view"];
7: view.InlineEdit = "TRUE";
8: view.Update();
9: }
The ‘InlineEdit’ property on the view is in the public beta version of SharePoint 2010 a string value. Hopefully they will change this to a Boolean value in the final version.