Disabling Icons in PropertyGrid

3 posts, 1 answers
  1. Evan
    Evan avatar
    3 posts
    Member since:
    Apr 2018

    Posted 26 Jul 2018 Link to this post

    How do you disable/hide the icons in the RadPropertyGrid. The icon to the left of the property name and then the icon in the middle between the property name and property value. Attached picture for reference.
  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    2818 posts

    Posted 30 Jul 2018 Link to this post

    Hi Evan,

    You can use the ItemFormatting event to access the items and hide the icons. Here is the code:
    private void RadPropertyGrid1_ItemFormatting(object sender, Telerik.WinControls.UI.PropertyGridItemFormattingEventArgs e)
    {
        var item = e.VisualElement as PropertyGridItemElement;
     
        if (item != null)
        {
            item.ExpanderElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
     
            ((PropertyGridTextElement)item.TextElement).PropertyValueButton.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
        }
     
    }

    I noticed that there is another thread for the same thing and I have deleted it. 

    I hope this will be useful. Let me know if you have additional questions.

    Regards,
    Dimitar
    Progress Telerik
    Get quickly onboard and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Evan
    Evan avatar
    3 posts
    Member since:
    Apr 2018

    Posted 08 Aug 2018 Link to this post

    Yep this worked perfectly!
Back to Top