Updating is not supported by objectdatasource

09 Feb

It acts as coordinator between underlying different physical data sources at data access layer and data bound controls like Grid View, Data Grid at presentation layer.These new Data Source controls are built with features like sorting, paging, editing and updating data directly in data source. We will discuss capabilities and worthiness of new Data Source controls available in ASP. I am limiting my discussion to only significant controls which happen to be the following given ones.You can declaratively bind data bound controls to business objects without writing single piece of code using Object Data Source control.Object Data Source control uses Reflection to expose and call the appropriate methods of a business object to select, insert and update data.Let's jump into an example to consolidate our understanding of the capabilities of Object Data Source control with a Grid View control that displays data on a web page using Object Data Source control.As discussed earlier, Object Data Source control identifies appropriate class name of business object using its Type Name property and a business object method that is called to retrieve data with its Select Method property.

NET, you can perform data access either programmatically or declaratively with out writing single piece of code.It enables data bound controls to perform database tasks like retrieval, editing and updating using intermediate middle-tier business object.It provides a structured way for you to bind data bound controls on page to middle-tier business object. The only workaround I found is by manually implementing a select button replacement with Get Post Back Event Reference() as described here: Turn callbacks off on 'Grid View1'."If I turn callbacks off, the select button works fine, but now the sorting is offset by one page load: The first time I click on a column header the new sort does not work, the second time I click the sort order of the previous click becomes active, and so on.