Silverlight refreshing domainDataSource

1.3k Views Asked by At

I have datagrid whichs items source is domainDataSource. How i can refresh Domain data source? domainDataSource1.Load() does not works

2

There are 2 best solutions below

0
On BEST ANSWER

Sometimes this helps:

myDomainDataSource.DomainContext.EntityContainer.Clear();
myDomainDataSource.Clear();

Drop those in your DomainDataSource's LoadingData event.

0
On

I think that should work for you, but my guess is that there is an error during the load or the load is finishing, but you are missing a PropertyChanged notification to tell data binding to update the visuals.

Try adding handlers to .Loading and .Loaded to make sure the load is starting and finishing without errors (and with data).

If that does not solve the issue, make sure you are raising the PropertyChanged event on your DataContext.