How to re-load or refresh GridView?

Discussion in 'ASP .Net Web Services' started by FD, Jun 19, 2006.

  1. FD

    FD Guest

    A GridView is binded by XMLDataSource with it's DataSourceID, and attached on
    a web form page.
    When the XMLDatasource was reloaded and refreshed, (a break point was
    setted, so it was sure the XMLDataSource was changed), but the GridView could
    not be reload or refreshed. Is there any method in GridView class to reload
    or refresh the control? Or it is a caching issue?
    Thanks, FD
    FD, Jun 19, 2006
    #1
    1. Advertising

  2. FD

    Teemu Keiski Guest

    XmlDataSource has caching enabled by default but if you have confirmed it
    changed e.g that it returns up-to-date data after the XML file has changed,
    that's not the problem (though make sure is it).

    You can call GridView.DataBind() in order to rebind the grid.

    --
    Teemu Keiski
    ASP.NET MVP, AspInsider
    Finland, EU
    http://blogs.aspadvice.com/joteke

    "FD" <> wrote in message
    news:D...
    >A GridView is binded by XMLDataSource with it's DataSourceID, and attached
    >on
    > a web form page.
    > When the XMLDatasource was reloaded and refreshed, (a break point was
    > setted, so it was sure the XMLDataSource was changed), but the GridView
    > could
    > not be reload or refreshed. Is there any method in GridView class to
    > reload
    > or refresh the control? Or it is a caching issue?
    > Thanks, FD
    >
    Teemu Keiski, Jul 1, 2006
    #2
    1. Advertising

  3. FD

    FD Guest

    Teemu,
    Thank you for your help. After set XmlDataSource.EnableCaching=false, it
    refreshes properly, even not call GridView.DataBind().
    Thanks, FD

    "Teemu Keiski" wrote:

    > XmlDataSource has caching enabled by default but if you have confirmed it
    > changed e.g that it returns up-to-date data after the XML file has changed,
    > that's not the problem (though make sure is it).
    >
    > You can call GridView.DataBind() in order to rebind the grid.
    >
    > --
    > Teemu Keiski
    > ASP.NET MVP, AspInsider
    > Finland, EU
    > http://blogs.aspadvice.com/joteke
    >
    > "FD" <> wrote in message
    > news:D...
    > >A GridView is binded by XMLDataSource with it's DataSourceID, and attached
    > >on
    > > a web form page.
    > > When the XMLDatasource was reloaded and refreshed, (a break point was
    > > setted, so it was sure the XMLDataSource was changed), but the GridView
    > > could
    > > not be reload or refreshed. Is there any method in GridView class to
    > > reload
    > > or refresh the control? Or it is a caching issue?
    > > Thanks, FD
    > >

    >
    >
    >
    FD, Jul 5, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. brian lanning
    Replies:
    0
    Views:
    574
    brian lanning
    Jul 29, 2003
  2. Per Magnus L?vold
    Replies:
    1
    Views:
    5,087
    John C. Bollinger
    Oct 8, 2004
  3. phil
    Replies:
    2
    Views:
    1,099
    Shahzad Godil
    Nov 14, 2006
  4. Rasika WIJAYARATNE
    Replies:
    0
    Views:
    600
    Rasika WIJAYARATNE
    Dec 14, 2007
  5. Pkenty
    Replies:
    0
    Views:
    378
    Pkenty
    May 28, 2004
Loading...

Share This Page