C rowupdating datakey

Anyway I will check it and sort it out tell you Here is my defaukt1code. (may be some omissions happehed while cut/paste) //default1cs using System; using System.

Once I checked Is Post Back in Row Updating event..

c rowupdating datakey-47c rowupdating datakey-75c rowupdating datakey-31

When I do an update, and get to the Grid View1_Row Updating, there is no value passed to "ID", and then when I go to the next row for "Company" I get the following error: Specified argument was out of the range of valid values.

Parameter name: index Any idea what I need to do to fix this issue? It is very useful to us in practical in our collage project.

I would not recommend you to append the values directly into your SQL statements , use Parameterized Query instead for security and readabily of codes..

your help will be highly appreciated.error is: Error 1 'System.

Configuration; public partial class _Default1 : System. Actually last night I spent many hours on this issue .

Page //default1Dear Karthicks Thank you very much for pointing it out.. And thankful of this link.thanks, Ritesh vyas How to update a dropdownlist in the gridview? I tried to use this: Drop Down List ddl = (Drop Down List)Grid View5. Now let’s create a method for executing the Update or Insert. Six of those paramaters basically comes from the Text Box values that were entered in the page. Invalid Cast Exception: Unable to cast object of type 'System. 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[0])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.

Tags: , ,