The In-Place Editing Feature

In-place editing in a DataGrid control is ruled by a special type of column named EditCommandColumn. You need to add exactly one column of that type to the grid to enable in-place editing. The text displayed in each cell of the column cannot be a data-bound or templated expression. It must be a literal string such as "Edit" or something you can define by using HTML tags, such as an image. You configure the EditCommandColumn class by specifying the text displayed for the Edit command button and for the link buttons that will let the user save or cancel an operation. For these three events—edit, update, and ­cancel—you must also provide handlers that control how the in-place editing begins, commits, or rolls back, ...

Get Building Web Solutions with ASP.NET and ADO.NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.