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

MultiObjects PropertyChange at Background

1 Answer 62 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Ji -Won
Top achievements
Rank 1
Ji -Won asked on 28 Feb 2012, 07:17 AM
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..

1 Answer, 1 is accepted

Sort by
0
Ivan Petrov
Telerik team
answered on 02 Mar 2012, 01:35 PM
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 >>
Tags
PropertyGrid
Asked by
Ji -Won
Top achievements
Rank 1
Answers by
Ivan Petrov
Telerik team
Share this question
or