combobox filter for a hierarchy grid (and other questions)

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

    Posted 06 Apr Link to this post

    Any tips or directions on how i can make a cascading combobox filter for a nested table?

    Currently i have a grid that has 2 tables (a parent and a child).

  2. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 11 Apr Link to this post

    Hi Cholo,

    You can use FilterTemplates to achieve this requirement. Place the combos within the template and implement your custom cascading logic:
    http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/filter-templates/defaultcs.aspx

    You can also check 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


    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
  4. Cholo
    Cholo avatar
    14 posts
    Member since:
    Mar 2016

    Posted 12 Apr in reply to Eyup Link to this post

    Thank you Eyup. Figured it out!

    I even managed to place the combobox outside the grid.

    Here's what it looked like

    <table id="filter">
        <tr>
            <th colspan="2">Filter Data</th>
        </tr>
        <tr>
            <td>by Group Company</td>
            <td>
                <telerik:RadComboBox ID="RadComboBox1" runat="server" EmptyMessage="Select" AutoPostBack="true" DataSourceID="ddlGroupCompany" DataTextField="GroupCompany" DataValueField="GroupCompany" Width="186px" AppendDataBoundItems ="true" >
                    <Items>
                        <telerik:RadComboBoxItem Text="All" Value="0" Selected="true"></telerik:RadComboBoxItem>
                    </Items>
                </telerik:RadComboBox>
            </td>
        </tr>
        <tr>
            <td>by Company</td>
            <td>
                <telerik:RadComboBox ID="RadComboBox2" runat="server" EmptyMessage="Select" DataSourceID="ddlCompany" DataTextField="CompanyUserName" DataValueField="CompanyUserName" Width="186px">
                </telerik:RadComboBox>
            </td>
        </tr>
         <tr>
            <td>by Customer</td>
            <td>
                <telerik:RadComboBox ID="RadComboBox3" runat="server" EmptyMessage="Select" DataSourceID="ddlCustomer" DataTextField="UserName" DataValueField="UserName" Width="186px">
                </telerik:RadComboBox>
            </td>
        </tr>
     </table>

    For the SQL tables, i indicated a control, it looked like this

    *SQL for the 3rd combobox (RadComboBox3 in this example)

    <asp:SqlDataSource ID="ddlCustomer" runat="server" ConnectionString='<%$ ConnectionStrings:SiteSqlServer %>' SelectCommand="SELECT * FROM [Customer] WHERE ([GroupCompany] = @GroupCompany)">
        <SelectParameters>
            <asp:ControlParameter ControlID="RadComboBox1" PropertyName="SelectedValue" Name="GroupCompany" Type="String"></asp:ControlParameter>
        </SelectParameters>
    </asp:SqlDataSource>

    And here's what it looks like inside the AjaxManager

     

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID ="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadComboBox1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadComboBox2" UpdatePanelCssClass=""></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="RadComboBox3" UpdatePanelCssClass=""></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadComboBox1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadComboBox3"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
     <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"></telerik:RadAjaxLoadingPanel>

    I may have some redundancies here. Let me know if there's anything i can improve on or i missed out on anything. 

    Thanks

     

  5. Cholo
    Cholo avatar
    14 posts
    Member since:
    Mar 2016

    Posted 12 Apr Link to this post

    UPDATE: i may have figured out how to make the comboboxes cascade itself but i'm still having difficulties using the 2nd combobox control the nested grid.

    Also, due to changes that needs to be made, i had to join 2 SQL tables for the nested grid (details table). Is it possible with telerik to create a combobox filter for that kind of grid?

     

  6. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 15 Apr Link to this post

    Hi Cholo,

    I'm afraid it is difficult to figure out your exact requirement. Could you elaborate on your scenario and send us screenshots or video demonstrating the desired behavior?

    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.
  7. Cholo
    Cholo avatar
    14 posts
    Member since:
    Mar 2016

    Posted 22 Apr in reply to Eyup Link to this post

    Hi Eyup,

    Here's what's currently working:

    This shows how the comboboxes work for this module (thanks to your tip)

    http://imgur.com/JKuekY0

    What i need is to have the 2nd combobox 'Company' control the content of the nested table

    http://imgur.com/1UWceoy

    In addition, the nested table doesn't have the column 'Company' and i had to join it with another table (ProductCodes). Here's what the table relationship looks like:

    http://imgur.com/CWSDUHG

    is this possible? 

    Let me know if you need me to further elaborate on what i need. Thank you for the help.

  8. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 28 Apr Link to this post

    Hello Cholo,

    For further instructions, please open a formal support ticket and send us a very basic runnable prototype of your application so we can further investigate it.

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017