Property Grid Item.

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

    Posted 12 Dec 2014 Link to this post

    What i am doing is creating  a class that has 3 variables of type object with a TypeConverterAttribute(ExpandableObject). I have register an event to the CreateItem of the property grid. Now what i want to do is create an object in the CreateItem that will have access to my object with the 3 object variable in them. So that way i can dynamically set those object to what i want. The problem i am running into is that Most of the properties of the PropertyGridItem are getters and there is no way for me to set them up.
  2. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 17 Dec 2014 Link to this post

    Hello Hugues,

    Thank you for writing.

    I am not sure that I understand your requirement completely. The CreateItem event is appropriate for replacing the default items with custom ones. For example, if you create a derivative of the PropertyGridItem and extend the base logic with additional properties/ methods, you can set your custom item to the CreatePropertyGridItemEventArgs.Item property. Additionally, you can customize the visual item elements following the demonstarted approach in our PropertyGrid >> Custom items help article. Thus, you can customize the PropertyGridItemElement and its child PropertyGridTextElement and PropertyGridValueElement items.

    If it does not suit your specific case, could you please give us some more details about the exact requirement that you are trying to achieve. Thus, we would be able to investigate the precise case and assist you further. Thank you in advance.

    I hope this information helps. Should you have further questions, I would be glad to help.
     
    Regards,
    Desislava
    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.

     
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top