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

How to search property name and value at property grid

1 Answer 471 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Khanh
Top achievements
Rank 1
Khanh asked on 09 Aug 2018, 08:03 AM

 I have a property grid. Property name = Appearance and has child cursor,font,Imagelist,... But ai search Appearance has not result. I expect search with property name= Appearance . has result with child.

 

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 09 Aug 2018, 10:27 AM
Hello, Khanh,       

"Appearance" is the name of a group, not a property name. That is why the search box, doesn't show any filter results. The default FilterDescriptor filters by the Label. 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.

It is possible to handle the RadPropertyGrid.FilterDescriptors.CollectionChanged event and change the FilterDescriptor.PropertyName property to "Category". Thus, the category name will be considered when filtering: 

private void FilterDescriptors_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
    if (this.radPropertyGrid1.FilterDescriptors.Count>0)
    {
        this.radPropertyGrid1.FilterDescriptors[0].PropertyName = "Category";
    }
}



I hope this information helps. If you have any additional questions, please let me know.  
 
Regards,
Dess
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
PropertyGrid
Asked by
Khanh
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or