Rowupdating how

NET Architecture MVP (Microsoft Most Valuable Professional) works as an Architect Consultant and provides consultancy on how to design and develop Web applications.

rowupdating how-3

He is the Editor of a Developer Magazine called DNC Magazine.

He has also written two EBooks 51 Recipes using j Query with ASP.

When trying to update a row of data in a gridview that is in edit mode, the Row Updating and Row Updated events never fire. I'm really looking for another way of setting up the Tab View control correctly without causing these problems.

Presumably this is happening because the page's structure is effectively being re-built which perhaps the viewstate can't cope with (or something to do with the Tab View being set-up in the On Init method)?

If we could have accessed the Bind method ,that implicitly performs two-way binding, in the code-behind then we could have just override the Row Databound event and assigned the value to the gridview's checkbox control using the Bind method.

But unfortunately the Bind is not available in ASP. We could still achieve this in two simple and easy steps. Wrap the Eval(fieldname) HTML code in a function eg: Checkvalue that checks the datafield value, performs transformations to True OR False values and assigns to Chekced property. Override the Row Updating event of gridview and update only the Checked property's value since the SQLData Source that is bound to gridview will take care of remaining fields to update.

The examples I've seen of adding a new section to umbraco include the code to allow a Tab View control to be added to a page within the new section.

In an override of On Init() you then set the Tab page's heading text and assign a Pane to become the Tab page's content. p=71 This all works fine and the page appears correctly.

Then we need to override the gridview's Row Updating event.

In this event you can write code to get the newvalue of checkbox's checked property only.

This might occur if the Update Panel was removed from the control tree and later added again, which is not supported.