Gridview rowupdating code behind

Row Updating event, doesn’t work as all samples say it should do.

All samples of course assume you’re doing everything in your page, but I have to do everything in my code-behind, because on forehand I don’t know what I’ll be binding to my Grid View.

Check out what I’m trying to do, maybe you can help?

For a while now I’m trying to figure out why my method, triggered by the Grid View.

[DEMO] Cancel Grid View Edit on Escape Key Press " data-medium-file="https://taditdash.files.wordpress.com/2014/03/demo-cancel-gridview-edit-on-escape-keypress.gif? w=300" data-large-file="https://taditdash.files.wordpress.com/2014/03/demo-cancel-gridview-edit-on-escape-keypress.gif? You can refer see that Event in the Source Code by Downloading it.

w=694" src="https://taditdash.files.wordpress.com/2014/03/demo-cancel-gridview-edit-on-escape-keypress.gif? w=800" alt="[DEMO] Cancel Grid View Edit on Escape Key Press" class="size-full wp-image-202" /First Row in Edit Mode " data-medium-file="https://taditdash.files.wordpress.com/2014/03/first-row-in-edit-mode.jpg? w=300" data-large-file="https://taditdash.files.wordpress.com/2014/03/first-row-in-edit-mode.jpg? w=150 150w, https://taditdash.files.wordpress.com/2014/03/first-row-in-edit-mode.jpg? w=300 300w" sizes="(max-width: 607px) 100vw, 607px" /First Row Cancel Button Source HTML " data-medium-file="https://taditdash.files.wordpress.com/2014/03/first-row-cancel-button-source-html.jpg? w=300" data-large-file="https://taditdash.files.wordpress.com/2014/03/first-row-cancel-button-source-html.jpg? w=800&h=246 800w, https://taditdash.files.wordpress.com/2014/03/first-row-cancel-button-source-html.jpg? w=150&h=46 150w, https://taditdash.files.wordpress.com/2014/03/first-row-cancel-button-source-html.jpg? w=300&h=92 300w, https://taditdash.files.wordpress.com/2014/03/first-row-cancel-button-source-html.jpg? w=768&h=237 768w, https://taditdash.files.wordpress.com/2014/03/first-row-cancel-button-source-html.jpg? w=1024&h=315 1024w, https://taditdash.files.wordpress.com/2014/03/1081w" sizes="(max-width: 800px) 100vw, 800px" / I am not writing the Update Event code here as it is not important in our discussion.

When I hit Update, the changes are not saved, and there is no error message. When I hit Update, the changes are not saved, and there is no error message. Then the page posts back, the text boxes go back to being labels and the new values are lost, and the Row Updating code never fires. Yes, I did put the breakpoint at the Row Updating line (and not in the function).

I put a breakpoint on the Row Updating event handler and found that the event is not fired. I put a breakpoint on the Row Updating event handler and found that the event is not fired. In the Row Editing function, the edit textboxes appear and I can get the "old" values Then the page renders, I edit the textboxes and hit Update.

Search for gridview rowupdating code behind:

gridview rowupdating code behind-11gridview rowupdating code behind-22gridview rowupdating code behind-20gridview rowupdating code behind-17

But for this demo, I’ll show you the simple version, that also doesn’t work 🙂Let’s bind the data to our Grid View and have it autogenerate our columns, as well as an edit button.

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “gridview rowupdating code behind”

  1. A crackdown on gay people in Egypt intensified in recent days as security forces raided cafes in downtown Cairo and courts delivered harsh prison sentences, further driving the nation’s LGBT community underground.