Gridview rowupdating event firing twice

I'm having a very hard time understand what would prevent your event from being fired.Do you have some sort of Java Script functionality that may be stopping it? A common problem people have with Grid Views is understanding when to data bind the data source to the Grid View.I'm new to C# Web apps so some insight would be helpful.Thanks My ASP protected void Task Grid View_Row Editing(object sender, Grid View Edit Event Args e) protected void Task Grid View_Row Canceling Edit(object sender, Grid View Cancel Edit Event Args e) protected void Task Grid View_Row Updating(object sender, Grid View Update Event Args e) private void Bind Data() { Grid View1.You have to make sure that you aren't setting your Grid View's data when it is not postback.If you do this, your Grid View's source will be refreshed before you're able to grab the new values out of it.So I am having an issue with doing an update in a Gridview during an On Row Updating event.

If I put a breakpoint on the row updating event it gets hit the first time through and the row is updated successfully. I tried setting it to false but I have other things going on in the page_load that doesn't happen and breaks the page.

Page loads, I choose my dropdown value, page loads fine.

When I go to click the edit button however, I have to click it twice in order to be able to edit or cancel (having issues with that also but thats a different issue) Anyway, I want to be able to have one click on edit to bring up the update/cancel editmode.

I would recommend trying this out and starting a new thread in the .

NET Forum so that other people can learn from the experience too. -Frinny You may need to turn off validation even if you are not validating anything.

Leave a Reply