I have a datagrid working with data provided by a WCF service I need to refresh the grid when changes are made at the database. To this end the application subscribes to a publishing service which then calls back and lets the application know when changes have been made. The issue is when the objectDataProvider is refreshed the current view of the grid is wiped out i.e the grouping,the current display, etc, so far the work around has been to redo the grouping and try to reconstruct the previous view from the code behind which does work but it also produces a very ugly situation with the display.
Any suggestions would be appreciated.
Thanks,
Are you using the latest version of the controls, v7.2 that was released last week. This was a bug that had been fixed, when the DataSource changed we were clearing the sorting/grouping criteria.
If you are up on the latest version and are still having the problem then maybe the code you are using to do the refresh is causing the issue. If you post the code you are using to refresh the grid then I may be able to spot what is causing the problem.
Unfortunantly I am using WPF 2007 Vol. 1 with the hot fix as I do not currently have a subscription to the WPF controls. This version was offered as a one time benefit to my NetAdvantage subscription. Do you know if this issue will be resolved for this version?
It has been fixed in 7.1 and will be included in the next hotfix.
Thanks for the information. Here's hoping that the next hot fix is not too far off.
Ok, Now that I have the newest version of the control. The grouping is staying set but upon doing an objectprovider.refresh() the grid looses the items that were expanded [:'(]
Any ideas?
Well it seems that there is another issue with refreshing the data.
When the user is trying to do a grouping and the data is refreshed the groupby area collapses.
If the data is updated frequently the user never gets the chance to complete the grouping.
Any ideas or work arounds?
Thanks