Gridview rowupdating e cancel
:icon_rolleyes: I'll fight a little more on my own and I'll post the results. I used your code in Row Editing event and gridview becomes editable, but I still have some trouble in accessing the Edit Template controls... the good old problem of getting the data from the row that is being currently edited within a Grid View. Accessing the "Controls": This method gets you access to the control in the Grid View, which might be useful based on what you are doing.Obviously the simplest method is to use Data Key Names on the Grid View and then you should have the data in your Grid View Update Event Args as part of e. (In the following example, I cast to a Check Box as I know I have a checkbox at the col Index You Are Interested In - you should cast to whatever control you have in that column).
Let us explore how to insert new records and Update and Delete existing records in Gridview. We will be using the ‘Categories’ table in the ‘Northwind’ database.
In my case this was happening because I was binding to a List of custom objects.
Note A common mistake that a lot of people do is that they perform a databind each and every-time the Page_Load method is called.
Refer to the ASPx Grid View - Batch Edit mode - How to use the client-side Focused Cell Changing event and cancel editing or disable an editor conditionally example for more details.
For versions 16.2 and below: This example demonstrates how to cancel editing or disable the editor conditionally for the grid when batch editing is in use.