First time question asked long time lurker.
I'm working on a Silverlight app with a view that implements a RadGridView. I have a ViewModel that binds a ObservableCollection of PersonSkills to that RadGridView. In the Model, PersonSkills is many to one Skill. Description is a property of Skill. They are joined by a foreign key on SkillId (Sorry not enough rep to post an image)
My column bindings in the RadGridView are to the Skill.Description property. Everything works fine until I make an edit in a dataform not represented here. The PersonSkills collection fires and I can see the changed value, and the change posts to the database but the RadGridView displays an empty cell instead of the Skill.Description like it should.
What do I need to do to get the RadGridView to reflect the changes that are made to a Property of the Skill collection which is a child of the PersonSkills collection?
<telerik:RadGridView
x:Name="skillsGrid"
ItemsSource="{Binding PersonSkills, Mode=TwoWay}"
SelectedItem="{Binding CurrentPersonSkill, Mode=TwoWay}"
ColumnWidth="*">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn
Header="SKILL"
DataMemberBinding="{Binding Skill.Description}"
IsGroupable="False"
Width="2*" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>
private ObservableCollection<PersonSkill> personSkills;
public ObservableCollection<PersonSkill> PersonSkills
{
get
{
return this.personSkills;
}
set
{
this.personSkills = value;
this.OnUiThread(() =>
{
this.RaisePropertyChanged("PersonSkills","CurrentPersonSkill");
});
}
}
private PersonSkill currentPersonSkill;
public PersonSkill CurrentPersonSkill
{
get
{
return this.currentPersonSkill;
}
set
{
if (this.currentPersonSkill != value)
{
this.currentPersonSkill = value;
this.RaisePropertyChanged("PersonSkills","CurrentPersonSkill");
}
}
}