skip to content »

successfulperson.ru

Handle rowupdating event

handle rowupdating event-79

My goal is to update the one row at the time with a button which is in the same row which calls the following Method.protected void Tests To Be Done_Row Updating(object sender, Grid View Edit Event Args e) Sql Command command Z = new Sql Command(query, my Connection); command Z. Close(); Set Patient Test Grid(Session["PATID"], e); } At my first try I had a On Row Command with the Grid View Command Event Args at the code behind.

handle rowupdating event-68

Yet in processing the Row Updating event, I cannot access controls in my Edit Item Template because my gridview is apparently no longer in edit mode (grid Vew. However, if I implement the gridview directly in an page (instead if in an User Control), the gridview behaves correctly in the rowupdating event hander.It seems like the Java Script can get mangled otherwise.If you are using command buttons, then do not use Auto Generate Edit Button.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.This can be beneficial to other community members reading the thread.

When all you've got is a Hammer, Every Problem looks like a Nail. Superguppie, thanks for pondering this with me (and what a trippy username! I'm not sure if I'm answering your question in a helpful way, but the User Control is referenced in the containing page's markup (not programmatically).

Enable View State isn't explicitly set, so it remains the default (true).

My usercontrol makes use of it's View State for other state parameters and that seems to be working just fine.

There are similar questions on Stackoverflow and other websites, but I seem to miss something.

I have a Grid View bound to a Data Table which comes from a database.

Binding form controls is mostly a simple matter of attaching a Data Source and setting your controls to reference the correct field in the Data Source.