Adding and Deleting Rows
To complete this demonstration, you'll need to add functionality that allows you to add and delete rows from your DataGrid control. Neither of these tasks is as difficult as updating data because you're working with an entire row rather than with individual fields.
Adding a New Row
Adding a row using the DataGrid control seems almost simple now, in comparison to some of the other code you've seen in this chapter. There are a few wrinkles, however.
First of all, there's no change to the DataGrid control required in order to allow you to add a row using the control—as far as the DataGrid control is concerned, adding a row is the same as editing a row. Managing the differences between the two is up to your own code. To add ...
Get ASP.NET Developer's JumpStart 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.