Hour 20. Editing the Data in a DataGrid

In the previous two hours, we saw how to enhance the DataGrid to allow for sorting and pagination. The DataGrid also can be configured to support inline editing of its data on a row-by-row basis. That is, a DataGrid can be configured so that each row of data contains an Edit button. When this Edit button is clicked, the row displays its data in textboxes, and the user can alter the values.

In this hour we will examine how to provide editing capabilities for a DataGrid. To implement the DataGrid's editing features, we will need to perform a series of steps, just as we needed to perform a series of steps to provide sorting and paging support.

In the first section, “Examining the Steps Required for Providing ...

Get SAMS Teach Yourself ASP.NET in 24 Hours 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.