Hi,
I have a webhierarchicaldatagrid with paging linked to a webhierarchicaldatasource linked to an objectdatasource that returns a lot of records so i decided to enable the cache of the objectdatasource.
My problem is that i cant manage to refresh the cache and make the grid show the new data.
In my code i use a button to refresh the cache and when i click that button, the selecting method of the objectdatasource is called and the webhierarchicaldatagrid shows the first page of the data but when i click the "next page" link it shows no data and no prev or next page buttons.
This is the code i use to refresh the cache:
protected void btRefresh_Click(object sender, EventArgs e)
{
ObjectDataSource.EnableCaching = false;
WHDGMovs.DataBind();
ObjectDataSource.EnableCaching = true;
}
What am i doing wrong ?
Hi fjVazquez,
It has been some time since your post but in case that you still need assistance I will be happy to help.
I would suggest to clear the cached data using something like the following code:
If you have any other questions, please do not hesitate to ask.
I'm just checking if you need any further assistance with the matter.