sbooth1117
asked on
WPF Database CollectionViewSource Question
I'm a WPF newbie so go easy on me.
Generally I've created a window to lookup a person in table. After closing that window I want to display more information about that selected user.
In one dialog window I have used a DataGrid to select a row representing a person.
After selecting the person, I exit the dialog with the System.Data.DataRow information saved. In the calling dialog I have a CollectionViewSource that contains all of the people. It seems like I should be able to use the row information that I've saved to move to the same row in the CollectionViewSource, but I can't find a way to do it. Is there a better way to do this or is there just something that I'm missing?
//C# code saving the person in the find a person window.
selectedItem = dtgPerson.SelectedItem as FAPDataSet.TblPersonRow;
XAML CollectionViewSource binding to table
<CollectionViewSource x:Key="tblPersonViewSource " Source="{Binding Path=TblPerson, Source={StaticResource FAPDataSet}}" />
Thank you in advance for your help.
Generally I've created a window to lookup a person in table. After closing that window I want to display more information about that selected user.
In one dialog window I have used a DataGrid to select a row representing a person.
After selecting the person, I exit the dialog with the System.Data.DataRow information saved. In the calling dialog I have a CollectionViewSource that contains all of the people. It seems like I should be able to use the row information that I've saved to move to the same row in the CollectionViewSource, but I can't find a way to do it. Is there a better way to do this or is there just something that I'm missing?
//C# code saving the person in the find a person window.
selectedItem = dtgPerson.SelectedItem as FAPDataSet.TblPersonRow;
XAML CollectionViewSource binding to table
<CollectionViewSource x:Key="tblPersonViewSource
Thank you in advance for your help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Or you may want to implement a more complex procedure to allow some enhancement later on by using some filter, like allow a multi selection : http://bea.stollnitz.com/blog/?p=31.