MultiObjects PropertyChange at Background

2 posts, 0 answers
  1. Ji -Won
    Ji -Won avatar
    6 posts
    Member since:
    Sep 2011

    Posted 28 Feb 2012 Link to this post

    Hello. Im using RadPropertyGrid with some own class...
    this class is like a this..

    public class Person : INotifyPropertyChanged
    {
    public event PropertyChangedEventHandler PropertyChanged;
    public void OnPropertyChanged(string name)
    {
    if(this.PropertyChanged != null)
    PropertyChanged(this, new PropertyChangedEventArgs(name));
    }
    private string name_;
    private int age_;
    public string Name { get { return name_; } set { name_ = value; OnPropertyChanged("Name"); } }
    public string Age{ get { return age_ ; } set { age_ = value; OnPropertyChanged("AGE"); } } 
    }

    public Form1()
    {
    InitializeComponent();
    person=New Person();
    person.Name="Chris";
    person.Age=15;
    person2=New Person();
    person2.Name="Tom";
    person2.Age=15; 

    radPropertyGrid1.SelectedObject=new object[]{person,person2};

    }
    public void AgePlusButtonClick(object sender,EventArgs e)
    {
    person.Age++;
    person2.Age++;
    }

    but when I click AgePlusButton radPropertyGrid doesn changed.
    thats why PropertyChanged  is always null.
    that changed when i clicked radPropertyGrid .
    when I use selectedobject. that is work. but when i use selectedobjects. that doesn work..
    how can I solve this one...

    Thanks..
  2. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 02 Mar 2012 Link to this post

    Hello Ji-Won,

    Thank you for writing.

    The INotifyPropertyChanged is currently only implemented to work with single selected object. I have logged your feature request into our Public Issue Tracking System - PITS. You can track its status and add your comment/vote for it on the following link - PITS Feature

    I have updated your Telerik points for the good suggestion.

    Should you have further questions, feel free to write back.

    Greetings,
    Ivan Petrov
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top