This is a migrated thread and some comments may be shown as answers.

How can I use a drop down filter with other filter functions?

5 Answers 16 Views
Grid
This is a migrated thread and some comments may be shown as answers.
J
Top achievements
Rank 1
J asked on 17 Sep 2015, 03:21 PM
I have the the combo box filter template, but how can I also get the filter button? I don't want to filter on index change, I want to apply multiple filters and be able to select "NotEqualTo" for combo box selections.

5 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 18 Sep 2015, 08:54 AM
Hi,

You can examine the third sample from the web sites provided in the following post:
http://www.telerik.com/forums/how-to-persist-dropdownlist-selected-index-and-value-on-postback-from-radgrid-filtertemplate#GW3MyQLmVEmy8XzsmrHzeQ

Hope this helps. If you have different requirements or further instructions, please elaborate on your specific scenario and send us sample screenshots or video demonstrating the desired behavior.

Regards,
Eyup
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
J
Top achievements
Rank 1
answered on 18 Sep 2015, 01:19 PM
Thank you, Eyup. I'm looking through the SearchMultipleValues code to see if I can apply it to my project. Is it possible to run this site though?
0
J
Top achievements
Rank 1
answered on 18 Sep 2015, 01:34 PM
Okay Eyup, the button there makes sense (should have been obvious), but what about getting the filter menu? I would like to be able to have the button click drop down the filter functions, namely "EqualTo" and "NotEqualTo".
0
J
Top achievements
Rank 1
answered on 18 Sep 2015, 06:13 PM
Here's a screenshot to clarify. I added a button next to the combo box in my filter template for the Status column (red box), but I would like for it to drop down the filtering functions (blue box). I'm stuck using an older version of telerik for now, ​which doesn't have RadDropDownButton.
0
Konstantin Dikov
Telerik team
answered on 23 Sep 2015, 07:20 AM
Hi,

I have to say that it will not be possible to use the built-in filter icon and its functionality for your FilterTemplate, because that button is generated internally by RadGrid. Nevertheless, you can place a filter icon in your FilterTemplate and open a RadContextMenu when you click on it with the filter functions that you want (EqualTo, NotEqualTo, etc.). 

Following is a very basic example demonstrating how to show a RadContextMenu on a RadButton click:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function showContext(sender, args) {
            var contextMenu = $find("<%=RadContextMenu1.ClientID%>");
            contextMenu.show(args.get_domEvent());
        }
 
        function itemClicked() {
            alert("item clicked");
            //execute your custom logic for initiating filtering
        }
    </script>
</telerik:RadCodeBlock>
 
<telerik:RadButton runat="server" Text="Filter" ID="RadButton1" OnClientClicked="showContext" AutoPostBack="false"></telerik:RadButton>
<telerik:RadContextMenu ID="RadContextMenu1" runat="server" OnClientItemClicked="itemClicked">
    <Items>
        <telerik:RadMenuItem Text="EqualTo"></telerik:RadMenuItem>
        <telerik:RadMenuItem Text="NotEqualTo"></telerik:RadMenuItem>
    </Items>
</telerik:RadContextMenu>

Hope this helps.


Regards,
Konstantin Dikov
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
J
Top achievements
Rank 1
Answers by
Eyup
Telerik team
J
Top achievements
Rank 1
Konstantin Dikov
Telerik team
Share this question
or