Gridview rowupdating datakey

Step 6 explores techniques for updating the brochure information while Step 7 looks at updating the picture.

To test this functionality out, add a new category, providing both a brochure and picture.

In earlier tutorials we saw how the Grid View control makes it simple to edit and delete text data.

In this tutorial we see how the Grid View control also makes it possible to edit and delete binary data, whether that binary data is saved in the database or stored in the file system.

This wizard starts by asking us how the Table Adapter query should access the database. The next step prompts for the type of query to be generated. Update, false)] public bool Update Category(string category Name, string description, string brochure Path, byte[] picture, int category ID) [System. As we discussed back in the An Overview of Inserting, Updating, and Deleting Data tutorial, the Grid View provides built-in deleting capabilities and these capabilities can be enabled at the tick of a checkbox if the grid s underlying data source supports deleting.

Since we re creating a query to add a new record to the (Click to view full-size image) In addition to updating the DAL, we need to update the BLL to include methods for updating and deleting a category. Currently the Object Data Source the Grid View is bound to () does not support deleting.

Leave a Reply