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:
using(SPSite site = new SPSite("URL of the site")) { SPWeb web = site.RootWeb; SPList list = web.Lists["Name of the list"]; SPView view = list.Views["Title of the view"]; view.InlineEdit = "TRUE"; view.Update(); }
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.