Formview itemupdating parameters

I need to do a custom update for a form view (I think/know), as some of the parameters that are required for updating values should not be updated by the users, such as userid of the person performing the action which is passed back to the database for auditing purposes.Additionally, there are some fields, such as Last Updated By, Last Updated Date that need to be seen, but not edited.

formview itemupdating parameters-29formview itemupdating parameters-45

Questo consente di fornire un metodo di gestione degli eventi che esegue una routine personalizzata, ad esempio la codifica HTML dei valori di un record prima di aggiornarlo nell'origine dati, ogni volta che si verifica questo evento.

The formview's datasource updateparameter is set to do nothing so that I can handle the update in codebehind.

Every item works fine, except for one parameter ("salesprice") that is missing in the Old Values and New Values argument of the Item Updating event of the formview.

Moverover, if you have any values that need to be added, just add them to New Values, and your Data Source should turn them into parameters. This can be beneficial to other community members reading the thread.

If a value is in that dictionary, it will overwrite whatever value is in the parameter with the same name. Please remember to click “Mark as Answer” on the post that helps you.

Leave a Reply