Completed
Last Updated: 26 Nov 2014 10:28 by ADMIN
ADMIN
Ivan Petrov
Created on: 29 Oct 2014 13:48
Category: PropertyGrid
Type: Feature Request
0
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.
0 comments