Partial Match

4 posts, 0 answers
  1. Mark
    Mark avatar
    127 posts
    Member since:
    May 2013

    Posted 13 Mar 2014 Link to this post

    Hi All,

    I've implemented the following functionality in my RadGrid:
    http://www.telerik.com/help/aspnet-ajax/grid-google-like-filtering.html

    It works well, but it appears to auto-fill the entire value when a user would like to select a subset.  For example, if we have days of the week in the ComboBox the user would like to be able to type "sday" and get Wednesday and Thursday back.  Is this at all possible?

    Thanks,
    Mark
  2. Mark
    Mark avatar
    127 posts
    Member since:
    May 2013

    Posted 13 Mar 2014 Link to this post

    Hello Again,

    Also is there a way to implement a IsNull and IsNotNull functionality in these ComboBoxes?

    Thanks,
    Mark
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 13 Mar 2014 in reply to Mark Link to this post

    Hi Mark,

    As for your first question lease try the following sample code snippet which works as expected for me.

    ASPX:
    <telerik:RadComboBox ID="RadComboBox1" runat="server" Filter="Contains" AllowCustomText="true"
        OnClientKeyPressing="OnClientKeyPressing1">
        <Items>
            <telerik:RadComboBoxItem Text="Sunday" />
            <telerik:RadComboBoxItem Text="Monday" />
            <telerik:RadComboBoxItem Text="Tuesday" />
            <telerik:RadComboBoxItem Text="Wednesday" />
            <telerik:RadComboBoxItem Text="Thursday" />
            <telerik:RadComboBoxItem Text="Friday" />
            <telerik:RadComboBoxItem Text="Saturday" />
        </Items>
    </telerik:RadComboBox>

    JavaScript:
    <script type="text/javascript">
        function OnClientKeyPressing1(sender, args) {
            if (args.get_domEvent().keyCode == 13) {
                for (var i = 0; i < sender.get_items().get_count(); i++) {
                    var text = sender.get_items()._array[i].get_text();
                    if (text.indexOf(sender.get_text()) != -1) {
                        alert(text);
                        //here it will retuns the items  and you can write your code
                    }
                }
            }
        }
    </script>

    I am not sure about your second question, can u please elaborate your requirement?

    Thanks,
    Shinu.
  5. Mark
    Mark avatar
    127 posts
    Member since:
    May 2013

    Posted 14 Mar 2014 in reply to Shinu Link to this post

    Thanks for the reply!

    I have implemented this:
    http://www.telerik.com/help/aspnet-ajax/grid-google-like-filtering.html

    Essentially the user would like to be able to filter the data on empty values as well as all values that are not empty.

    Thanks,
    Mark
Back to Top