CustomItem for property grid.

2 posts, 0 answers
  1. Hugues
    Hugues avatar
    54 posts
    Member since:
    Sep 2014

    Posted 03 Feb 2015 Link to this post

    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.

  2. Dimitar
    Dimitar avatar
    2983 posts

    Posted 06 Feb 2015 Link to this post

    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.


    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.

Back to Top