RadComboBox Filter SqlDataSource with where conditions

3 posts, 0 answers
  1. Subhashini
    Subhashini avatar
    35 posts
    Member since:
    Oct 2014

    Posted 04 Feb Link to this post

    Hi,

    I am trying to load a radcombobox filter as below,  the sqldatasource where conditions are coming from session values - session("ssnUSER_NAME") and session("ssnUSER_ID"). //VB.net 4.5/2015Q2/Oracle

    The radcombo filter is not getting populated.

    What am I missing?

    Also a secondary question, I want to display user name but the filter should pickup user_id="some_id". Is it possible?

    Any help will be greatly apprerciated. Thanks.

    <telerik:GridBoundColumn DataField="USER_NAME" HeaderText="CREATED BY"

    SortExpression="USER_NAME" UniqueName="USER_NAME" ReadOnly="true">

    <FilterTemplate>

    <telerik:RadComboBox RenderMode="Lightweight" ID="rcbUserName" DataSourceID="SqlDataSource5" DataTextField="USER_NAME"

    DataValueField="USER_NAME" Height="200px" AppendDataBoundItems="true" SelectedValue='<%# TryCast(Container, GridItem).OwnerTableView.GetColumn("USER_NAME").CurrentFilterValue %>'

    runat="server" OnClientSelectedIndexChanged="UserNameIndexChanged">

    <Items>

    <telerik:RadComboBoxItem Text="All" />

    </Items>

    </telerik:RadComboBox>

    <telerik:RadScriptBlock ID="RadScriptBlock4" runat="server">

    <script type="text/javascript">

    function UserNameIndexChanged(sender, args) {

    var tableView = $find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID %>");

    tableView.filter("USER_NAME", args.get_item().get_value(), "EqualTo");

     

    }

    </script>

    </telerik:RadScriptBlock>

    </FilterTemplate>

    </telerik:GridBoundColumn>

     

     

    <asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:ApplicationServicesOracle %>"

    ProviderName="<%$ ConnectionStrings:ApplicationServicesOracle.ProviderName %>"

    SelectCommand="select distinct b.USER_NAME, b.USER_ID from tblPTS a join tblUSER_DETAILS b on a.USER_ID = b.USER_ID where (b.TEAMLEAD = :ssnUSER_NAME or a.USER_ID = :ssnUSER_ID) and (a.STATUS = 'RECEIVED' or a.STATUS = 'IN PROGRESS')">

    <SelectParameters>

    <asp:SessionParameter Name="ssnUSER_NAME" SessionField="ssnUSER_NAME" />

    <asp:SessionParameter Name="ssnUSER_ID" SessionField="ssnUSER_ID" />

    </SelectParameters>

    </asp:SqlDataSource>

     

     

     

  2. Subhashini
    Subhashini avatar
    35 posts
    Member since:
    Oct 2014

    Posted 05 Feb in reply to Subhashini Link to this post

    Nevermind. I used some string functions to make it work. But still searching if there is a simpler straightforward way to do it.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Subhashini
    Subhashini avatar
    35 posts
    Member since:
    Oct 2014

    Posted 05 Feb Link to this post

    I spoke to soon. I replaced the radcombo sql parameter with the session values but it throws ORA-01036: illegal variable name/number.
Back to Top