Hello,
just moved from R1 to R2 and we have a problem with some of the bindings in the GridView
In the UC I have a grid described like this:
in the vm I have the properties
and in persoana I have something like
My problem is that in R1 when I updated the information in a separate form for one of the entries the information got updated in the grid too. now it doesn't do that. If i sort the items by a column the information shows up correctly again.
Why is that? i would really like to move my solution to R2 but this is really a problem.
Thanks in advance.
just moved from R1 to R2 and we have a problem with some of the bindings in the GridView
In the UC I have a grid described like this:
<telerik:RadGridView Margin="6,6,1,4" CanUserReorderColumns="False" CanUserDeleteRows="False" CanUserInsertRows="False" IsReadOnly="True" AutoGenerateColumns="False" IsFilteringAllowed="False" SelectionMode="Extended" SelectedItem="{Binding PersoanaSelectata, Mode=TwoWay}" ItemsSource="{Binding Persoane, Mode=TwoWay}" Name="radGridViewPersoane" ShowGroupPanel="False" > <telerik:RadGridView.Columns> <telerik:GridViewDataColumn Header="Nume" DataMemberBinding="{Binding Nume}" Width="4*" TextWrapping="Wrap" IsReadOnly="True"/> <telerik:GridViewDataColumn Header="Prenume" DataMemberBinding="{Binding Prenume}" Width="4*" TextWrapping="Wrap" IsReadOnly="True"/> </telerik:RadGridView.Columns> </telerik:RadGridView>in the vm I have the properties
private VerificarePersoana _verificarePersoana; public VerificarePersoana VerificarePersoana { get { if (_verificarePersoana == null) _verificarePersoana = new VerificarePersoana(); return _verificarePersoana; } set { _verificarePersoana = value; Notify("VerificarePersoana"); } } private ObservableCollection<Persoana> persoane; public ObservableCollection<Persoanaa> Persoane { get { if (_verificarePersoana.Persoane == null) { _verificarePersoana.Persoane = new ObservableCollection<Persoana>(); } return _verificarePersoana.Persoane; } set { _verificarePersoana.Persoane = value; Notify("Persoane"); } }and in persoana I have something like
private string _nume;public string Nume { get { return _nume; } set { _nume = value; Notify("Nume"); }}private string _prenume;public string Prenume { get { return _prenume; } set { _prenume=value; Notify("Prenume"); } }
public void Notify(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
My problem is that in R1 when I updated the information in a separate form for one of the entries the information got updated in the grid too. now it doesn't do that. If i sort the items by a column the information shows up correctly again.
Why is that? i would really like to move my solution to R2 but this is really a problem.
Thanks in advance.
