Connecting Tech Pros Worldwide Forums | Help | Site Map

How to apply the modification of the propertygrid programmatically

Marco Segurini
Guest
 
Posts: n/a
#1: Feb 28 '06
HI,

my form contains a combobox and a propertygrid control.
At each string of the combobox is associated an object.
When I select a string of the combobox the associated object is selected
in the propertygrid in this way:

this.propertyGrid1.SelectedObject
= aObject[this.comboBoxCfg.SelectedIndex];
this.propertyGrid1.Refresh();


My problem is this:
If I modify the properties of the current object and I select a new
object the modifications aren't applied by SelectedObject statement.
So if I quickly reselect the modificated object I don't see any
modification.

To see the modification I have to close and reopen the form.

Is there any way to apply the modification before to call SelectedObject?

TIA.
Marco.

Closed Thread