ComboBox problems /- ignoreCase & dropdown

5 posts, 0 answers
  1. Dorian
    Dorian avatar
    21 posts
    Member since:
    Nov 2013

    Posted 28 Nov 2013 Link to this post

    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.});
  2. Dorian
    Dorian avatar
    21 posts
    Member since:
    Nov 2013

    Posted 29 Nov 2013 Link to this post

    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.
  3. Kendo UI is VS 2017 Ready
  4. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2566 posts

    Posted 02 Dec 2013 Link to this post

    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!
  5. Dorian
    Dorian avatar
    21 posts
    Member since:
    Nov 2013

    Posted 27 Dec 2013 Link to this post

    As I've said the matter was resolved by modifying the .ashx so the component now works as it should :)
  6. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2566 posts

    Posted 27 Dec 2013 Link to this post

    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!
Back to Top
Kendo UI is VS 2017 Ready