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

Refreshing cell values

2 Answers 59 Views
GridView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 12 Jan 2011, 11:52 PM

In a few posts on this forum, it states that if the bound objects in a RadGridView implement the INotifyPropertyChanged interface, then the grid is supposed to refresh the cell values that are bound to those properties when the values change. However, this is not working for me. I have a RadGridView that is bound to objects that implement this interface, and when the properties are changed the grid does not refresh. The value do refresh however if I do something like change filter values. upon changing the filter values in a column, I see my updated values.

Here is the code for my objects and for the grid:

private string _name;
public string Name
{
    get
    {
        return _name;
    }
    set
    {
        if (_name != value)
        {
            _name = value;
            OnPropertyChanged("Name");
        }
    }
}
<telerikGridView:RadGridView.Columns>
  <telerikGridView:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Name}" HeaderTextAlignment="Center" IsReadOnly="True"/>
  <telerikGridView:GridViewDataColumn Header="Size" DataMemberBinding="{Binding Size}" 
</telerikGridView:RadGridView.Columns>

What am I missing?

Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Maya
Telerik team
answered on 13 Jan 2011, 09:26 AM
Hi David,

May you provide a bit more details about your particular scenario ? Do you do anything more specific ? Do you handle any events ? 
Still I am sending you the sample project I used for reproducing your issue. May you take a look at it and let me know in case of any discrepancies according to your requirements ?
 

Greetings,
Maya
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
David
Top achievements
Rank 1
answered on 13 Jan 2011, 06:47 PM
D'Oh! I had a typo in my OnPropertyChanged() function!

Thanks
Tags
GridView
Asked by
David
Top achievements
Rank 1
Answers by
Maya
Telerik team
David
Top achievements
Rank 1
Share this question
or