I have a web application in which I generate Telerik RadGrids programatically based on some definition. Some of our datasets require custom template columns for which I have created special subclasses of GridTemplateColumn.
Some of the functions I currently override to support single selection filtering:
var filterList =
filterList.Width = FilterControlWidth;
filterList.DropDownAutoWidth = RadComboBoxDropDownAutoWidth.Enabled;
filterList.SelectedIndexChanged += filterList_SelectedIndexChanged;
// COMBO BOX IS POPULATED HERE -- CODE REMOVED
RadComboBox).SelectedValue = CurrentFilterValue;
sender, RadComboBoxSelectedIndexChangedEventArgs e)
GridFilteringItem filterItem = (GridFilteringItem)((RadComboBox)sender).NamingContainer;
Everything here works as I expected, I am able to filter the grids by selecting an item in the radcombo box.
My question is, how can I modify this code to allow multiple selections (via the checkbox feature of the radcombo) and have my grid filter to contain the rows with any of the selected values?
The issue would seem to be with the filterItem.FireCommmandEvent. There doesn't seem to be a way to indicate an "IN" filter or ".Contains" in LINQ syntax. Is what I am trying to do not possible? I've see the example solution referenced in other threads, but that involves editing the filter expressions on the grid directly. Is that something I can do from the column itself?