Hi,
I have extended GridBoundColumn to create a column where filtering can be done by selecting a value in a RadComboBox in the filtering row.
The filtering is triggered in the combobox's index changed event handler:
private void combo_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e) { var combo = (RadComboBox)sender; GridKnownFunction currentFilterFunction = combo.SelectedItem != null && combo.SelectedValue != allValue ? GridKnownFunction.Contains : GridKnownFunction.NoFilter; var filterItem = (GridFilteringItem)(combo.Parent.Parent); filterItem.FireCommandEvent(RadGrid.FilterCommandName, new Pair(currentFilterFunction.ToString(), this.UniqueName)); }protected override string GetCurrentFilterValueFromControl(TableCell cell) { var combo = (RadComboBox)cell.Controls[0]; return combo.SelectedItem != null ? combo.SelectedValue : combo.Text; }I'm thankful for any help!
The RadComboBox now supports multiple selections with its "Checkboxes" property. I would therefore like to implement this functionality to this filtering column as well.
The issue I am having is that I do not know how to filter on multiple values.
In the above example, a filter command is fired containing the filter function and the column's uniquename. TheGetCurrentFilterValueFromControl function then returns what filter value to use. How can I here return multiple values? Or should I attack this issue in a whole different way perhaps? :)