Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
2008.1 grid & LinqDataSource problems
posted

Hi,

we've beeen waiting for NA 2008.1 to come out just to evaluate the anticipated support for LinqDataSource and now what we're seeing here is quite disappointing. Basically the grid seems to be read-only as it was with 2007.3.
Scenario is as following:

* ASP.NET WebApplication in VS2008, browser IE6
* simple table accessed from LinqDatasource, select * from it
* Enable Insert, Update, Delete set for the LinqDataSource
* LinqDataSource bound to the grid, DataKeyField for the band set to the table primary key, BaseTableName set to the table name in the dbml model, AJAX enabled, Allow Cell Updating enabled as well as row adding and deletion
* Set Hidden=true in the grid band for the datasource properties representing relationships - 1 EntityRef and 1 EntitySet (also tried removing them from the band)
* Added an empty event handler for UpdateRow as per suggestion found on this forum by one of your employees (also tried without, no change)

Result:
when I edit a cell and move to another row, I see the "refresh" image superimposed showing that the grid is being updated on the database. Yet, no change in the database table itself.
With a webgrid bound to a SqlDataSource (same table), repeating the same steps above, the update works and I can see rows changed in the database.
Also my attempts with new row insertions and deletions yielded no results. I guess I'm missing something but documentation on your site seems to just skip this point, and the SDK samples too.

Can we please have some clear-cut directions on whether 2-way databinding with LinqDataSource is fully supported with the new 2008.1 WebGrid, and how to exactly accomplish basic CRUD operations in this scenario?  So far the old, buggy, ugly, standard GridView is looking just so much better.

Thank you.