I'd be happy to post more of my code if it would help you out, I just didn't want to flood my post with code that wasn't relevant to the problem. Hence, the Update statement has no idea where to get the @Category value from. Yes, that's why I wanted to see your Update parameters, because, as I suspected, there's no Control Parameter that passes the selected value of the dropdownlist.Free counters Added on January 19,2012 Follow Me @vmsdurano A bit About Me Disclaimer The opinions expressed herein are my own personal opinions and does not represent the opinions of my employers. Contol)Text; it werk just Fine any comment and thx for the code Instead of adding a Customer ID to your table and later pulling the text to get the ID number, a more reliable way to do it is to add a Data Key Names field to the grid example in the page: You can then access this information at any time with the following in code: Grid View1. Row Index]["id"]); You can do this with any field, but I've found customers get confused when they see the ID field and kept asking me why it was there, this also eliminates any issues if you change the display order of your table later (maybe add an edit/update/cancel control) Hey...great article ;)But I got a problem... So here I go with my example:protected void Grid View1_Row Updating(object sender, Grid View Update Event Args e) and the debugger says: Exception Details: System. We can achieve the same functionality using Datakeys. In this example, I am going to retrieve values from categories table of Northwind database. Drag a Grid View into the Web Form and assign Data Key Names property with the primary key column i.e. In the gdview_Row Editing and gdview_Row Deleting event, we have used the below code to retrieve categoryid from datakey of Grid View, int catid = int. In this demo use the Edit type combo box to specify the control element used to edit the data: cell or row.The 'Start Edit Action' combo box allows you to specify the action (click, double click, or focused cell click) that should be used to begin editing grid data.For those who do not know on how to generate Events in Grid View you can follow these steps below: I have a project that I coppied the above code into.
Now let’s create a method for executing the Update or Insert. The Grid View validates user-input on the client-side based on the data annotation attributes of your Model.This approach is also called unobtrusive client validation. An error is displayed next to the individual data editors.To hide the deleted rows from the view, set the Settings Editing. You can cancel all changes by clicking the 'Cancel changes' link.If a grid contains modified data, it displays a confirm message before a grid callback is performed.If you are not familiar of binding the Grid View the way then I would suggest looking at my previous example first before you proceed to this example. Parameter name: index Any idea what I need to do to fix this issue?