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

Disabling Icons in PropertyGrid

2 Answers 122 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Evan
Top achievements
Rank 1
Evan asked on 26 Jul 2018, 08:14 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 30 Jul 2018, 11:17 AM
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.
0
Evan
Top achievements
Rank 1
answered on 08 Aug 2018, 03:39 PM
Yep this worked perfectly!
Tags
PropertyGrid
Asked by
Evan
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Evan
Top achievements
Rank 1
Share this question
or