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

ComboBox problems /- ignoreCase & dropdown

4 Answers 136 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Dorian
Top achievements
Rank 2
Dorian asked on 28 Nov 2013, 11:37 AM
I have a few problems with combobox based upon: combobox/serverfiltering.html;

First one is related to lower/higher case of characters i'm typing. While the server does return appropriate results the dropdown does not appear to trigger (so the results . If I trigger it manually in code it immediately closes back. I've tried using ignoreCase and altering it between true and false but it apparently doesn't matter :/

The second problem is that if I remove the focus from the combobox and return to it later on I cannot seem to be able to delete the input content or open the dropdown via button, especially if I've typed a character combination upon server doesn't return results.

Any help or hints would be greatly appreciated. I also provided the full source code of the problematic code.
01.var _ds = new kendo.data.DataSource({
02.    serverfiltering: true,
03.    transport: {
04.        read: {
05.            url: "ashx/Main/GetAvailableOUs.ashx",
06.            dataType: "json",
07.            data: { searchSTR: searchSTR_ }
08.        }
09.    },
10.    schema: {
11.        model: {
12.            id: "text",
13.            fields: {
14.                value: { from: "OUid", type: "number" },
15.                text: { from: "OU", type: "text" },
16.                Img: { from: "Img", type: "text" },
17.                isActive: { from: "IsActive", type: "number" }
18.            }
19.        }
20.    }
21.});
22. 
23.$("#OUSelector").kendoComboBox({
24.    dataTextField: "text",
25.    dataValueField: "value",
26.    dataSource: _ds,
27.    minLength:3,
28.    ignoreCase: false,
29.    autoBind: false,
30.    highlightFirst: false,
31.    change: function (e) {
32.        _ds.options.transport.read.data = { searchSTR: e.sender._selectedValue };
33.        _ds.read();
34.    },
35.    filter: "contains",
36.    template: '# if (Img == "") ' +
37.              '{# <span id="#: value #" style="display:block;margin:-1px -5px -2px -5px;padding:0 5px; # if (isActive == 0) {# background:red;color:white; #}#">#: text #</span> #}' +
38.              'else' +
39.              '{# <span id="#: value #" style="display:block;margin:-1px -5px -6px -5px;padding:0 5px; # if (isActive == 0) {# background:red;color:white; #}#"><img src="/img/#: Img #.png" alt="#: text #" />#: text #</span> #}#',
40.    select: function (e) {
41.        kMain.fn_logon_to_company($(e.item[0]).children("span").attr('id'));
42.    }
43.});
44. 
45.$(".OUSelectorContainer .k-input").on('keydown', function (e) {
46.    e.sender = { _selectedValue: e.currentTarget.value };
47.    var ouselect_ = $("#OUSelector").data("kendoComboBox");
48. 
49.    ouselect_.options.change(e);
50.});

4 Answers, 1 is accepted

Sort by
0
Dorian
Top achievements
Rank 2
answered on 29 Nov 2013, 07:07 AM
The matter was somewhat resolved - still having a bit of issues when leaving the field but the first problem was resolved by not using custom event handling but rather by changing the ashx file to receive the different form of data.
0
Kiril Nikolov
Telerik team
answered on 02 Dec 2013, 02:53 PM
Hello Dorian,

I have tried to reproduce the issue that you are describing, but to no avail. Could you please extract a runnable sample, showing the problem that you are facing, so we can investigate it locally?

Thank you very much for your cooperation.

Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Dorian
Top achievements
Rank 2
answered on 27 Dec 2013, 12:15 PM
As I've said the matter was resolved by modifying the .ashx so the component now works as it should :)
0
Kiril Nikolov
Telerik team
answered on 27 Dec 2013, 02:09 PM
Hello Dorian,

I am glad to hear that you found a solution for the problem. You also said that you are still experiencing some other issues I am glad that this is not the case.

Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ComboBox
Asked by
Dorian
Top achievements
Rank 2
Answers by
Dorian
Top achievements
Rank 2
Kiril Nikolov
Telerik team
Share this question
or