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.
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,
Thanks Konstantin,
I had already tried resetting the itemsource to null but I hadn't cleared the entity collection. I have now set my on navigated method to clear all the collections before binding the itemsource again and it works.
Cheers