Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
135
Empty empty/reload xamgrid
posted

Hi

I was wondering if there was a way to empty a xamgrid of contents or to reload it. The problem I am having is that I have a xamgrid on a Silverlight page that is loaded with data. When I backup to the previous page and select a different option to populate the grid the page loads with the previous data still in the grid and also the new data.

I need a way to clear the xamgrid when the page OnNavigatedTo method is called. I have tried setting the xamgrids itemsource to null to no avail.

Any help would be greatly appreciated.

Parents
  • 6759
    Verified Answer
    Offline posted

    Hi Ashley,

    you need to set XamGrid's ItemsSource to null. If the the type of the data source is different the on the other page you might have to clear the Columns collection as well.

    Hope this helps,

Reply Children
No Data