Hello everybody,
I have a problem with rebinding the data of the grid. When a user comes back to our master page (Redirect) we rebind the data. This rebind is fast in Firefox but slow in IE 11. After the rebinding in IE the complete grid freeze. If you click on it, a message from the IE reports a long running script message. After some seconds the freezing go away and you can work again with the grid as expected. Following the way we do the rebinding
ddgProduced.EnableDataViewState = true; ddgProduced.GridView.ClearDataSource(); ddgProduced.DataSource = dsData; ddgProduced.DataBind();
Does anybody know such a behavior? The message indicates maybe a script problem ?!?
Thanks and regards
Kai
Hi Kai,
Thanks for posting in our forums!
Some things you can try based on the code you provided:
1. Setting EnableDataViewState to false. This adds the data within the grid to your ViewState, which can increase your request/response sizes and slow down your pages.2. Do not call ClearDataSource(). This is meant to be used when switching between different datasources and clear out the schema. Since you are redirecting to this page, I do not think this would be necessary.3. DataBind() also does not need to be called. During the PreRender stage, the grid checks if DataBind() has been called and will automatically call DataBind() if not.
Please let me know if this helps.
Hi Michael,
setting the EnableDataViewState to false leads to another problem. After a click on a child row all data in the grid disappears. The grid is then empty.
regards
Hello Kai,
You should be setting the grid's DataSource on each postback. If you are not doing this, the data on postback will not show up in the grid. Using EnableDataViewState is not recommended unless you are displaying static data (i.e. without paging, sorting, filtering, updating, etc...).
You can find more information on the EnableDataViewState property in our documentation here.
If you have any further questions or concerns with this, please let me know.