PAGING EVENT OF GRIDVIEW WITH CACHING OBJECT

Samuel Fernandes

Total Post:159

Points:1117
Posted by  Samuel Fernandes
 859  View(s)
Ratings:
Rate this:

I displaying the Gridview data form cache object.When i click on the pagenumber it shows blank webpage. how to handle the paging with caching object .

Do i need to check the same condition in paging event

 DataTable GetByCahe =(DataTable) Cache["DataStore"];

            if (GetByCahe != null)

            {

                ManageRegGrid.DataSource = GetByCahe;

                ManageRegGrid.DataBind();

            }

            else

            load From the database

  1. Sumit Kesarwani

    Post:378

    Points:2694
    Re: Paging Event of GridView With Caching Object

    Hi Samuel, 

    You do need same checking and rebinding if the cached data is not available.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!