Detailsview fired event itemupdating which wasn

Actually, if you read more carefully you'll see that the behavior you desire is only defined for the Button class - not the Link Button class.If you use a Button instead of a Link Button it will work as documented. An image button got as far as the item command but never got to the Object Data Source updating event.NET is smart enough to do it for me automatically !! Supplement information: Upon clicking Edit Item Template's update link button: Item Command event is triggered, then return and goes no further. This is my foresaid work around solution: programmatically fill in datasource's parameters, when apparently ASP. However, I am still appreciate if anyone can explain this problem.Why isn't Form View's Item Updating event fired, when obviously link button's command name = "Update"? protected void Form View1_Item Command(object sender, Form View Command Event Args e) protected void Object Data Source1_Updating(object sender, Object Data Source Method Event Args e) protected void Object Data Source1_Inserting(object sender, Object Data Source Method Event Args e) private void set ODSParameter(Object Data Source Method Event Args e) Thanks for your suggestion, but I don't think it is a common practice to invoke ODS' update event manually.Do I have to call the Change Mode() method in the Mode Changing event handler? I can see the mode in the process of changing, because my Mode Changing handler gets called, but then the Mode Changed handler never gets called. I didn't think to check whether Mode Changed was only called when using a Data Source ID-object.I don't generally use Data Source ID-type objects, preferring a more "explicit" style of data binding.But I have written a formview whose bind fields are optionally set to invisible too, but that formview works anyway.

I'm trying to understand how to respond to mode changing events in a Form View control.(3b) Then I copy and paste the exact coding from the problem aspx to ....this modified works, to my amazement !!! This aspx works......until not knowing when.....update command problem happen again.Work around I am going to do: Programmatically fill in datasource's parameters and promatically invoke datasource's updating event. But I am so reluctant because with so many aspx I have written, I know ASP.- Mark Hi Mark, I had a look at the Form View control's code, and it seems Mode Changed event is only raised when formview is bound to a datasource control (i.e. See it for yourself: private void Handle New() Unfortunatelly, you have to handle Mode Changing event and call Change Mode() manually with e.New Mode argument: protected void fv_Mode Changing(object sender, Form View Mode Event Args e) Done.

Leave a Reply