Hi,
I have a ObjectDataSource bound to the grid, the initial data load selects the data from the database 4 times using the same select statement, I have tried setting the datasource at runtime and design time with the same results in both cases. I know its not the ObjectDataSource because when I bind it to the standard .NET GridView it only selects the data once.
Secondary problem to this is: I have the webgrid in a warp panel, when sending an asynchronous postback using the warp panel, the webgrid then refreshes the data in the grid 4 times using the same select statement before processing the update/insert/delete operation. This seems excesive and totaly unwanted and unnecessary. The side effect from this is that it retrieves my concurrency control column from the database when it should be using the value that is in the grid.
Any one else have these sorts of problems with the grid?
Thanks
It seems a bit unusual that the grid should be calling select on your data multiple times. It's hard to guess why this is happening without knowing more about your project. The best thing to do would be to take the problem to developer support. They'll be able to help you diagnose what's going wrong.
The grid will refresh the data on each postback. It does this so that it doesn't have to store the row information in ViewState. It shouldn't be doing it four times though, only once. The ObjectDataSource has a caching option (I think the property is called AllowCache) that you might be able to use to avoid having to go back to the database on each postback.
Helen Emerson"] The grid will refresh the data on each postback. It does this so that it doesn't have to store the row information in ViewState. It shouldn't be doing it four times though, only once. The ObjectDataSource has a caching option (I think the property is called AllowCache) that you might be able to use to avoid having to go back to the database on each postback.
How can I force the grid not to refresh on postback? I already have caching on ObjectDataSource, so it doesn't go to the database, but it is still very very slow, because it renders all the rows.
My grid is in a modal popup and on closing this popup I don't want it to refresh, it is going to disappear anyway.
I tried setting the DataSource to null, it doesn't help.