can be retrieved through the collection of values that are stored in the event argument.The initial bind is OK, but like with the insert, binding isn't provided for both directions. The problem is that the properties for those templates aren't in the collection, and aren't automatically updated, at least that is what I was having problems with.

asp net detailsview itemupdating e newvalues-89

To clarify this take a look into what's happen on the Item Updating event, if we checked the e. Keys collection before we set the Name filed as read-only filed we will find that this collection contains two Items: The Details View will not pass the read-only fields to the underlying data source and this is not an issue Details View designed like this.

Take a look to Handle Update method in the Details View control using reflector and you will find it does not include Read-only fields when extracting values from fields.

I was having a problem with template fields in a details view, where it doesn't automatically get the value from a template field.

The problem is the template shows up as a control through Find Control and a child control of the cell, whereas boundfields, etc.

One of the flexible and new features came with ASP. This data bound control is used to display the values of a single record from a data source in an HTML table, where each table row represents a field of the record.

The Details View control allows you to edit, delete, and insert records.

In this post I will explain an issue related with Read-only data fields.

We will bound a Details View control to a Sql Data Source for simplicity reason you can use any data source control ... After configuring the pet Shop Sql Data Source and enable update, insert and delete we set the Details View Data Source Id to our pet Shop Sql Data Source Id and so the Details View now have 3 fields bound to Category table.

So how do you ensure that it is there, without custom inserting/updating? Selected Value); I haven't tried this with the updating yet, but I did this with insertion, and it worked great.

The way that I did it, whether right or wrong, is to attach to the Item Inserting event. I don't know if this is a good idea or not, but I don't see any other day. for each of the item templates that the data will be updated.

Then, I retrieve the value from the control, and append it to the e. So my Item Inserting would look like: Form View view = (Form View)sender; Drop Down List box = view. Brian: I am trying to implement this strategy and I can not access my drop down list from my Item Inserting event handler. ferthermore you will also see that when in Read Only that it will display the text for the current records value(eg for stop type "Pick Up" "Drop Off" ect) hope this helps This saved me.