But it also returns the original values which I do not want. Thanks When you cancel the Updating event, the Details View is left in edit mode and the values you entered are not changed. If you want to manipulate the values in the Details View you can iterate through the Rows collection (one row for each field displayed), and then the Cells collection (two cells: the header, the value). I would report this as a bug at the MSDN Feedback centre (https://connect.microsoft.com/feedback/).
Anything reported here gets through to the development team.
However, when I hit F5 (refresh), the Item Updating method is called again, and updates the database.
I trap the Form View Data Bound event and set the Selected Index of the Drop Down List at that time.
I trap the Item Updating event from the Form View in order to do some validation and fill in some more complex values.
In that method I have the following line of code: EXACTLY the same line of code appears in the method that handles the Item Inserting event (except I use Values instead of New Values) and it works flawlessly.
Again, formview is trying to pass these parameters So given that, I have defined the following even handler for a simple form view: (not sure if this is the way to proceed given the above, but...) protected void Form View1_Item Updating(object sender, Form View Update Event Args e) My questions are as follows: 1) Is this the right approach?
2) Is so, when I cancel the edit (because I did the update myself), and change mode, the Form View returns to read only mode as inteneded (good so far).Although the default is for it to enter Read Only mode after an update, that is not guaranteed.Scott Mitchell April 2007 Summary: This is the Visual C# tutorial. This template usually contains content to alert the user that the data source does not contain any records. Defines the content for the empty data row displayed when the Form View control is bound to a data source that does not contain any records.or am I just unlucky, or is there another way I am supposed to handle this?