This is a migrated thread and some comments may be shown as answers.

PRISM navigation with combobox Loss Data

0 Answers 64 Views
DomainDataSource
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ubuntu
Top achievements
Rank 1
Ubuntu asked on 31 Jul 2012, 12:02 PM

 Dear All,

I am using PRISM 4 with regions and navigation. I created a master region that has a data service shared through region context to all details views(regions), the master view opens(navigate to) the detailed views that uses RadComboBoxs and normal textboxes to display data.The Combos are binded using using QDSCV as follows:

private QueryableDomainServiceCollectionView<Nationality> _nationality;
public QueryableDomainServiceCollectionView<Nationality> Nationality
{
    get { return _nationality; }
    set { _nationality = value; RaisePropertyChanged(() => Nationality); }
}

and I load the data as follows when the view is opened

DataService = RegionManager.Regions[RegionNames.DetailsRegion].Context as IAvtDataService;
Nationality = DataService.GetNationality();
Nationality.Load();

ISSUE:
When the master region navigate to the detail's view ... everything is correct, combo are working fine and data is displayed okay.
if I change the current selected master record try to open a new view the combos don't show any data at all although the textboxes are still showing the data correctly.

I have investigated the issue and find that the QDSCV has a property named "HasChanges" and its values is false the first time the view opened but is true next time. If I did this "Nationality.RejectChanges()" everything works fine.

Question:
What trigger the HasChanges on the QDSCV ??! although no changes has been applied to the data displayed.

Best

Tags
DomainDataSource
Asked by
Ubuntu
Top achievements
Rank 1
Share this question
or