Vb net detailsview itemupdating Karla devito hot

event when an Update button (a button with its Command Name property set to "Update") within the control is clicked, but before the Form View control updates the record.

vb net detailsview itemupdating-26

I have a Details View control to which I am binding the results of a Linq-to-XML query.I want the default view to be Read Only and to display an edit icon to switch to edit mode.When in edit mode, I want to display save/cancel icons to commit or cancel the update.I can see the control switch to edit mode properly, but after clicking the save icon, the overriden Item Updating event that I wrote does not fire. The Mode Changing and Init events fire because they specify a Handles clause.If I set the Default Mode of the control to Edit, it works as expected, but I do not want to leave it in edit mode all the time. The Item Updating event also specifies a similar Handles clause, but it still does not fire.

Why doesn't it remember that it was in edit mode during the update postback? I also tried manually specifying an On Item Updating value as you described but it still does not fire. This works except that this code sits within a user control that is actually loaded as part of the postback to the parent page, so Page.Is Post Back is always true when the Init for the Details View is called.How can I distinguish the initial load from subsequent ones? If the data binding does not happen again, does the server just keep loading the data for subsequent postbacks from View State? The Mode Changing and Init events fire because they specify a Handles clause.The Item Updating event also specifies a similar Handles clause, but it still does not fire.I also tried manually specifying an On Item Updating value as you described but it still does not fire.Item Updating event not fired for Details View I have problem with Item Updating event in Details view.