views:

11

answers:

0

I have the following code.

When one of the properties value is changed the focus will be jumped to other property- focus changed to "Text" when boolean property was changed, to be specific.

Why this is happening?

    propertyGrid1.SelectedObject = textBox1;


    void propertyGrid1_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
    {
        propertyGrid1.SelectedObject = new System.Object();
        propertyGrid1.SelectedObject = textBox1;
    }

Thanks,

related questions