Edit this page

Filtering

Just like the grouping and sorting functionality, filtering is possible both through the text box of the toolbar, or programmatically by populating the FilterDescriptors collection of RadPropertyGrid. For the first option, just enable the toolbar by setting ToolBarxVisible to true and type the desired search string in the text box:

Figure 1: RadPropertyGrid Filtering

propertygrid-features-filtering 001

To add filters programmatically, first make sure that the EnableFiltering property is set to true and then, define the desired FilterDescriptor and add it to the control FilterDescriptors collection.

You can filter by the following criteria’s:

  • Name: The property name.

  • Value: The property value.

  • Category: Assigned from the Category attrubute name.

  • FormattedValue: The value of the property converted to string.

  • Label: By default this is identical to the property name, unless changed by setting the Label property of the item.

  • Description: This is determined by the property Description attribute

  • OriginalValue: The value used when the property is initialized.

Figure 2: Filter Descriptor

propertygrid-features-filtering 002

Adding a Filter Descriptor

FilterDescriptor filter = new FilterDescriptor("Name", FilterOperator.Contains, "size");
radPropertyGrid1.FilterDescriptors.Add(filter);

Dim filter = New FilterDescriptor("Name", FilterOperator.Contains, "size")
RadPropertyGrid1.FilterDescriptors.Add(filter)

See Also