'Filter' Button

2 posts, 0 answers
  1. Cholo
    Cholo avatar
    14 posts
    Member since:
    Mar 2016

    Posted 07 Apr Link to this post

    I made a simple grid (using radgrid control) and i have a combobox that filters details on the grid based on the item selected item in the combo box

    Here's what i have on the client side for the combobox

    <label for ="Label1">Select One:</label>
    <telerik:RadComboBox ID="RadComboBox1" runat="server" DataSourceID="SqlDataSource2" DataTextField="GroupCompany" DataValueField="GroupCompany" AutoPostBack ="true" AppendDataBoundItems ="true" >
        <Items><telerik:RadComboBoxItem Text=" " Value=" " Selected ="true" /></Items>
    </telerik:RadComboBox>
    <asp:SqlDataSource runat="server" ID="SqlDataSource2" ConnectionString='<%$ ConnectionStrings:SiteSqlServer %>' SelectCommand="SELECT * FROM [Table-GroupCompany]"></asp:SqlDataSource>
    <br />

    The grid uses a different source (SqlDataSrouce1) just for everyone's reference. I used the demo for using Combobox as filter for RadGrid

    How do i make a button that will execute the filter functionality that the combobox makes?

    I couldn't follow nor find the demo for making a filter button (because perhaps it's too much spoon feeding :p) I appreciate any help possible.

    Thank you!

  2. Eyup
    Admin
    Eyup avatar
    3015 posts

    Posted 12 Apr Link to this post

    Hi Cholo,

    You can use the filter() method to achieve this requirement:
    http://www.telerik.com/forums/radgrid-enable-filter-code-behind#cel1slcp-U-pmV28CfXTrg

    You can check the following live sample for a reference:
    http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/filter-templates/defaultcs.aspx

    You can also examine the first web site from this post:
    http://www.telerik.com/forums/how-to-persist-dropdownlist-selected-index-and-value-on-postback-from-radgrid-filtertemplate#GW3MyQLmVEmy8XzsmrHzeQ

    I hope this will prove helpful.

    Regards,
    Eyup
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top