Use Checkboxlist to generate multiple select parameters

2 posts, 0 answers
  1. chris
    chris avatar
    11 posts
    Member since:
    Sep 2007

    Posted 15 Jun 2009 Link to this post

    Hi guys,

    I am using a combination of RadSplitters with sliding panes and static panes to display monthly sales data.

    The static panes section has 3 radgrids showing Period data, Year-To-Date data and lastly Year-On-Year data
    The sliding panes section has to panes the first being a general information and help area telling the user what to do and the second has two comboboxes (both integers) and a checkboxlist (string) - all of which determine the select parameters for the sql datasource.

    After making selections each radgrid visibility is set to true and then databound

    I have no problem in getting the selected value for each and applying to the datasource, howevere mut problem arises when making multple selections in the checkbox list. For example the user may wish to combine sales departments and view the net result. The second selection only populates the grid when the first is unchecked. How can I stop this to return all or some departments?

    SqlDataSource as follows :-


    <asp:SqlDataSource ID="YellowBookPeriodSummaryData" runat="server" ConnectionString="<%$ ConnectionStrings:Intranet_DBConnectionString %>"



    SelectCommand="SELECT TOP 100 PERCENT Year, Period, SUM(Qty) AS Quantity, SUM(Volume) AS [Vol Sq Ft], SUM(NetSales) AS [Net Value], SUM(StdCost) * - 1 AS Cost, SUM(Margin) AS [Margin ()], (SUM(NetSales) + SUM(StdCost)) / SUM(NetSales) * 100 AS [Margin (%)] FROM Tbl_Sales_Downloads WHERE (SalesCategory IN (@Category)) GROUP BY Year, Period HAVING (Year = @Year) AND (Period = @Period)">






    <asp:ControlParameter ControlID="CheckBoxList1" Name="Category" PropertyName="SelectedValue"



    Type="String" />



    <asp:ControlParameter ControlID="CbxYear" Name="Year" PropertyName="SelectedValue"



    Type="Int64" />



    <asp:ControlParameter ControlID="CbxPeriod" Name="Period" PropertyName="SelectedValue"



    Type="Int64" />








    Any Ideas welcomed
    thanks in advance
  2. Yavor
    Yavor avatar
    11 posts

    Posted 16 Jun 2009 Link to this post

    Hi chris,

    The question set forth has been addressed in the support ticket, which you have opened on the matter. To avoid duplicate posts, we can continue our communication there.

    All the best,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top