Filtering
RadDropDownList supports filtering of its items. In order to apply a filter, you should set the Filter property of RadDropDownList to a predicate that will be called for every data item in order to determine if the item will be visible.
Filter
this.radDropDownList1.Filter = FilterItem;
Me.radDropDownList1.Filter = AddressOf FilterItem
Filtering predicate
private bool FilterItem(RadListDataItem item)
{
if (item.Text.StartsWith("L"))
{
return true;
}
return false;
}
Private Function FilterItem(item As RadListDataItem) As Boolean
If item.Text.StartsWith("L") Then
Return True
End If
Return False
End Function
If you apply the above filter to a RadDropDownList that is bound to the Northwind.Customers table you will obtain the following result:
Another option to filter the items is to specify the FilterExpression property.
FilteringExpression
this.radDropDownList1.FilterExpression = "Country LIKE 'Argentina'";
Me.radDropDownList1.FilterExpression = "Country LIKE 'Argentina'"
The IsFilterActive property gets a value indicating whether there is a Filter or FilterExpression set.