Filter operator list

2 posts, 0 answers
  1. Paul Taylor
    Paul Taylor avatar
    41 posts
    Member since:
    Jun 2010

    Posted 05 Apr 2011 Link to this post

    I have a column in a RadGrid that has a customised Filter control. Rather than the standard text box, I have used the column's FilterTemplate to display a RadCombo list containing possible filter values. I have a couple of questions relating to this scenario.

    In addition to the list, I would like to show the standard list of filter operators that normally appears next to the text box in filter controls. Does a control exist to implement this feature? How is it configured?

    When the user selects a value from the list, in code-behind the filter is applied and the grid is rebound. As a result, the combo is repopulated and its SelectedValue property is initialised to null. However, I want the SelectedValue property to be set to the value the user has just selected, so that selecting all other items in the list produces the appropriate re-filtering action. How can I do that?

    Suggestions welcome, thanks in advance!

                    <telerik:GridBoundColumn DataField="CaseStatus" FilterControlAltText="Filter status column"
                        HeaderText="Case Status" UniqueName="Status">
                            <telerik:RadComboBox runat="server" ID="ddlStatus" AutoPostBack="true"

            protected void ddlStatus_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
                string filterExpression = string.Format("CaseStatus = {0}", (byte)Enum.Parse(typeof(CaseStatus), e.Value));
                rgResults.MasterTableView.FilterExpression = filterExpression;
  2. Mira
    Mira avatar
    1124 posts

    Posted 08 Apr 2011 Link to this post

    Hello Paul,

    I have followed your scenario and prepared a sample project for you demonstrating how the desired functionality can be implemented. You can find it attached to this message.

    I hope it helps.

    Kind regards,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top