Refreshing cell values

3 posts, 1 answers
  1. David
    David avatar
    7 posts
    Member since:
    Oct 2010

    Posted 12 Jan 2011 Link to this post

    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. Answer
    Maya
    Admin
    Maya avatar
    4062 posts

    Posted 13 Jan 2011 Link to this post

    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>>
  3. DevCraft banner
  4. David
    David avatar
    7 posts
    Member since:
    Oct 2010

    Posted 13 Jan 2011 Link to this post

    D'Oh! I had a typo in my OnPropertyChanged() function!

    Thanks
Back to Top