Cached Data Source?

3 replies. Last post: April 6, 2010 10:58 PM by Glenn Layaar
Tags :
  • New Discussion
  • New Question
  • New Product Feedback

Hi,

Could someone clarify how the AllowAutoDataCaching works? I have that enabled on my grid and I have the following event definition for the InitializeDataSource handler:


protected void Initas(object sender, DataSourceEventArgs e)
        {
            var cached = WebGrid1.IsDataCached();
            if (!cached)
            {
                e.DataSource = CommonService.GetCountries();
                WebGrid1.AddDataSourceToCache(e.DataSource);
            }
        }

 

But everytime that event executes (via postback or flypostback) I get WebGrid1.IsDataCached() = false.

Thanks

All times are GMT -5. The time now is 12:34 AM.
Previous Next