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

6 posts, 0 answers
  1. J
    J avatar
    35 posts
    Member since:
    Oct 2012

    Posted 17 Sep 2015 Link to this post

    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.
  2. Eyup
    Admin
    Eyup avatar
    3666 posts

    Posted 18 Sep 2015 Link to this post

    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
  3. J
    J avatar
    35 posts
    Member since:
    Oct 2012

    Posted 18 Sep 2015 in reply to Eyup Link to this post

    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?
  4. J
    J avatar
    35 posts
    Member since:
    Oct 2012

    Posted 18 Sep 2015 in reply to Eyup Link to this post

    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".
  5. J
    J avatar
    35 posts
    Member since:
    Oct 2012

    Posted 18 Sep 2015 Link to this post

    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.
  6. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2425 posts

    Posted 23 Sep 2015 Link to this post

    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
Back to Top