RadListView allows filtering operations in all views. To enable filtering operations use
the EnableFiltering property of the control:
Copy[C#] Enable filtering
radListView1.EnableFiltering = true;
Copy[VB.NET] Enable filtering
RadListView1.EnableFiltering = True
Once the filtering is enabled, we have to create a new FilterDescriptor
and assign its PropertyName, FilterOperator
and SearchCriteria. First, let’s filter the items by their value and look
for items starting with “Local”.
Copy[C#] Filter by value
FilterDescriptor valueFilter = new FilterDescriptor("Value", FilterOperator.StartsWith, "Local");
radListView1.FilterDescriptors.Add(valueFilter);
Copy[VB.NET] Filter by value
Dim valueFilter As New FilterDescriptor("Value", FilterOperator.StartsWith, "Local")
RadListView1.FilterDescriptors.Add(valueFilter)
When a column name is specified as PropertyName of the filter descriptor,
RadListView will filter by the values of the specified column:
Copy[C#] Filter by type
FilterDescriptor typeFilter = new FilterDescriptor("Type", FilterOperator.Contains, "Disk");
radListView1.FilterDescriptors.Add(typeFilter);
Copy[VB.NET] Filter by type
Dim typeFilter As New FilterDescriptor("Type", FilterOperator.Contains, "Disk")
RadListView1.FilterDescriptors.Add(typeFilter)