After dropping the Form View onto your page, add, in the Page Load event, the code to build your collection of objects and set the Data View's Data Source property to that collection.You'll also need to store that collection somewhere in-between the user's trips to the server -- the Session object is a good choice.

formview itemupdating oldvalues-33formview itemupdating oldvalues-31

Item Updating Also, don't forget to assign the sqldatasource as the formview's datasource in each postback, otherwise your formview's datasource would be nothing.

I have a radgrid using a form template to do my inserts and updates.

I have a grid which has the Add/Save/Cancel command as Command Items. During insert/update, I want to validate the values after the user enters values and throw an error message on clicking Save.

I tried the approach you have mentioned, but old values are only retained and not new ones entered by the user.

I would just like to display an error if validation failed. Hello Binh, On Item Updated event will fire only when the grid is bound to Data Source Control.

Since you are using Need Data Source event to bind the grid, try the following approach to make the grid in edit mode after update operation.

Here is an example: Function Get SQLData Source() As Sql Data Source Dim sql Return As Sql Data Source = Nothing Try sql Return = New Sql Data Source sql Return.

Connection String = My Connection String 'Build Select Command and Parameter List sql Return.

Web Controls 名前空間Details View クラスGrid View Form View Row Form View Mode Access Data Source クラスSql Data Source Object Data Source Allow Paging Current Mode Data Key Names Default Mode Pager Style Pager Settings Edit Row Style Empty Data Row Style Footer Style Header Style Insert Row Style Pager Style Row Style Edit Item Template Empty Data Template Footer Template Header Template Insert Item Template Item Template Pager Template Item Created Item Command Item Deleted Item Deleting Item Inserted Item Inserting Item Updated Item Updating Mode Changed Mode Changing Page Index Changed Page Index Changing employees Form View.