Row updating event in asp net

Rated 4.67/5 based on 532 customer reviews

So am calling the method Bind Grid Data method which is overloaded .

row updating event in asp net-75

row updating event in asp net-86

Here’s the code to get the Id: There’s now no other way to get the edited row number other than looping through the rows of the Grid View and comparing the datakey value of each row with the key that was passed to the on Row Updated method from the Grid View Updated Event Args parameter. To achieve the desired before/after detection behavior, I’ve added a hidden read-only data field in the Grid View markup that will hold the original value of the field. Equals(key Field Value)) { Now that we’ve stepped through the details, let’s look at the Mark Up for the Grid View as well as the methods (in VB. Row Index Dim str Original Ddl Value As String = CType(tmp Row. Text Dim str User Selected Ddl Value As String = CType(tmp Row. That way on the on Row Updated method we have to grab the row that was updated, and then manually compare the state of the user-available ‘Status’ dropdown list with the value in the read-only field. NET and C#) to find the edited grid like and run our custom code. In this case, you can use the on Row Updated method to check before and after values for the field you are interested in.In the example code at the end of this article, notice that I’m checking the state of an imaginary field called ‘Status’.

Leave a Reply