Last Updated: 26 Nov 2014 10:28 by ADMIN
Ivan Petrov
Created on: 29 Oct 2014 13:48
Category: PropertyGrid
Type: Feature Request
IMPROVE. RadPropertyGrid - Currently if a user creates data items for sub properties through the CreateItem event he has to use the constructor of the new item to set its parent.
Here is the code that should be used for custom sub-properties

private void OnCreateItem(object sender, CreatePropertyGridItemEventArgs e)
    e.Item = new MyPropertyGridItem((PropertyGridTableElement)sender, e.Parent);

As visual studio would be happy of you only provide a constructor with one argument when you inherit from PropertyGridItem you have no way of knowing that you need a second one where the parent should be the second argument.

The proper way to handle this would be to set the parent internally.
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)