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

CustomItem for property grid.

1 Answer 62 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Hugues
Top achievements
Rank 1
Hugues asked on 03 Feb 2015, 05:24 PM
I am creating a new ItemElementType of CustomItem in the CreateItemElement of the property Grid. I override the CreatePropertyGridValueElement but then i notice that Data pointer is set to null, even though the  Item is already create in the createItemElement of the property grid. So my question is that how do i get access to the PropertyGridItemBase object in the CreatePropertyGridValueElement since the only way to create the object it seems like you have to set the e.ItemElementType to a specific type you want to create using reflection.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 06 Feb 2015, 11:28 AM
Hello Hugues,

Thank you for contacting us.

I am not sure what exactly you are trying to achieve. By default each item element has a particular value element. The different types of properties have different item elements and you cannot use the same item element with different kind of value elements - you should change the entire item element. Complete example for this is available here: Custom items

If you need further assistance with this please send us your code. This will give is better understanding of your exact scenario and we will be able to provide you with a proper solution. 

I hope this helps.

Regards,
Dimitar
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Dock
Asked by
Hugues
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or