O'Reilly logo

ASP.NET Developer's JumpStart by Ken Getz, Paul D. Sheriff

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required