How to re-load or refresh GridView?

F

FD

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
 
T

Teemu Keiski

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.
 
F

FD

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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top