Gridview rowupdating event not working

6854933580_2c8b688306_z

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.Within the Item Template I have an Image Buttong with a Command Name of "Edit".This works as expected and I can put a breakpoint in the Row Command event handler to see the "Event" command name.It's the control's responsibility to add its contents to viewstate. Find Control("control Name"); to get the control in the row.

gridview rowupdating event not working-75gridview rowupdating event not working-90gridview rowupdating event not working-23

aspdotnet-suresh offers C#articles and tutorials,csharp dot net,articles and tutorials, VB. 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).I am trying to do some dynamic stuff with my Grid View, so I have wired up some code to the Row Data Bound event. I am trying to get the value from a particular cell, which is a Template Field. My problem lies in that the click on the Update Image Button posts back, but neither the Row Command nor Row Updating events get triggered.

You must have an account to comment. Please register or login here!