Odd Behavior with FilterTemplate on RadComboBox

4 posts, 0 answers
  1. Eric Klein
    Eric Klein avatar
    183 posts
    Member since:
    Aug 2009

    Posted 01 Dec 2011 Link to this post

    I have a screen that contains a RadGrid where I set the GroupSetting CaseSensitive = false, and I allow filter b column.  This woks for all my columns except for a column I have set with a filter template that contains a RadComboBox.  When I select from the combo nothing gets returned.  When I run SQL Server Profiler I can see the OnNeedDataSouce query works and returns data.  If I change the grid to populate with the column being set to upper case it works.  If I Remove the CaseSensitive it works.  Why is it having an issue with the filter with a radcombo box?

    <GroupingSettings CaseSensitive="false" />
        <Excel Format="Html" />
     <AlternatingItemStyle BackColor="#EEEEEE"></AlternatingItemStyle>
     <MasterTableView DataKeyNames="AdvisorBlotterID" PagerStyle-Mode="NextPrevNumericAndAdvanced">
               <telerik:GridBoundColumn SortExpression="ClientName" DataField="ClientName" HeaderText="Client Name" >
                             <telerik:RadComboBox ID="RadComboBoxClientName" DataTextField="ClientName" DataValueField="ClientName" AppendDataBoundItems="true" Width="150px" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("ClientName").CurrentFilterValue %>' runat="server" OnClientSelectedIndexChanged="ClientNameIndexChanged" Skin="Office2007">
                            <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                                   <script type="text/javascript">
                                        function ClientNameIndexChanged(sender, args) {
                                            var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                            if (args.get_item().get_value() == "0") {
                                                    tableView.filter("ClientName", args.get_item().get_value(), "NoFilter");
                                            else {
                                                    tableView.filter("ClientName", args.get_item().get_value(), "EqualTo");
                    <ItemStyle VerticalAlign="Top" />
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 01 Dec 2011 Link to this post

    Hello Eric,

    Check the following demo which implements the same.
    Grid / Filter Templates

  3. Eric Klein
    Eric Klein avatar
    183 posts
    Member since:
    Aug 2009

    Posted 02 Dec 2011 Link to this post

    Yes I can see that but it does not take into account the GroupSetting CaseSenstivie = "false". I can ge the drop down to work but I also have plain text box filters that I would like to not be case sensitive. 
  4. Vasil
    Vasil avatar
    1604 posts

    Posted 07 Dec 2011 Link to this post

    Hello Eric,

    In a local copy of the demos I set: <GroupingSettings CaseSensitive="false" /> for the grid and then set AllowFiltering="true"  for the ContactName column.
    Now the filtering is working fine for all ComboBoxes and for the ContactName column. See the attached screenshot.

    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top