Asp net objectdatasource not updating
The good news is with a little extra code, we can have our custom objects act just like fancy Data Sets.
In this example i am explaining how to Insert Edit Update Grid View With Object Data Source In Asp. For this i've created a simple database with a table named Details having 3 columns ID, Name and Location. Now right click on solution explorer and select add new Item To learn how to configure database connection and connection string for this example read my article Insert Edit Delete record in Grid View using Sql Data Source Item Template and Edit Item Template Right click on Data Set designer window and select Add Save the solution Now go to html markup of the page and change the html code of gridview according to code written below to implement Item Template and Edit Item Template I'm using Bind method in Edit Item Template of Grid View so we do not need to write and code in Code Behind The html source of page should look like Save,build and run the application Hope this helps Download sample code attached Related posts: Insert Edit Delete record in Grid View using Sql Data Source ASP.
The Grid View control is one of the great time savers of ASP. Sorting, paging, editing, deleting, and even AJAX (set Enable Sorting And Paging Callbacks to True) is included out of the box.