This is a migrated thread and some comments may be shown as answers.

Partial Match

3 Answers 11 Views
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 13 Mar 2014, 09:05 PM
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

3 Answers, 1 is accepted

Sort by
0
Mark
Top achievements
Rank 1
answered on 13 Mar 2014, 09:11 PM
Hello Again,

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

Thanks,
Mark
0
Shinu
Top achievements
Rank 1
answered on 14 Mar 2014, 04:30 AM
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.
0
Mark
Top achievements
Rank 1
answered on 14 Mar 2014, 02:42 PM
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
Asked by
Mark
Top achievements
Rank 1
Answers by
Mark
Top achievements
Rank 1
Shinu
Top achievements
Rank 1
Share this question
or