The detailsview detailsview1 fired event itemupdating which wasn t

12 Mar

But can you please let me know where I can find the ID for my edit field in my detailsview.? First of all, I have added the edit button in my "Details View" by using the command Fields. but as i said from my post above, error doesnt come out anymore but when i hit the edit button that I've added in my details view. Regards Hello My friend, Yes I have done that as well. Now the problem is when I hit the update link, the data that i have edited was not updating at all. ------------------------------------------------- Protected Sub btnseacrh_Click(By Val sender As Object, By Val e As System. Ofcourse when I hit the edit link, Update and Cancel link will be visibled. You have to specify which method handles the Mode Changing event.This event is raised when a Form View control attempts to switch between edit, insert, and read-only mode, but before the mode actually changes. If it's bound via Linq Data Source, Sql Data Source or Object Data Source I suggest you have a look at the Updating Event.There you have access to the object via the Event Args. New Object or something like that You can cast this property into the corresponding type and make your changes.

Cheers, Marco Hi, You use custom data source to bind Details View, so you have to handle the Mode Changing event of Details View. Anyway, I've done that already and no error comes up but I couldnt edit the fields. I'm trying to insert or update data into a database from detailsview through coding. Without giving a datasource to details view, because it is very easy. Page Protected Sub Page_Load(By Val sender As Object, By Val e As System. Load Dim cnstr As String = Web Configuration Manager. Data Bind() End Sub Protected Sub Grid View1_Row Command(By Val Dim cn As New Sql Connection(cnstr) Dim cmdstr As String = "select ID, TDATE, CITY, ZIPCODE STATE from residence where id =" & ID Dim ad As New Sql Data Adapter(cmdstr, cn) Dim ds As New Data Set ad.