how to track keypress event on combobox

5 posts, 0 answers
  1. parthiv
    parthiv avatar
    1 posts
    Member since:
    Sep 2012

    Posted 18 Jul 2013 Link to this post

    Hello Support,

    I want to trace, entry key press on combobox. I am not able to achieve that, please let me know how could I achieve this.

    Thanks,
    Parthiv
  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2566 posts

    Posted 19 Jul 2013 Link to this post

    Hello Parthiv,

    You can use the jQuery focus() method to check when the combobox is focused, and attach it to the input that is actually holding the Kendo UI Combobox. 

    $("#YourComboBox").data("kendoComboBox").input.focus(function(){
                console.log("focus");
              });

     

    Regards,
    Kiril Nikolov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Roohul
    Roohul avatar
    6 posts
    Member since:
    Apr 2009

    Posted 22 Feb in reply to Kiril Nikolov Link to this post

    Hi Kiril,

    It is not working in my case. I want to call key press event in kendo combobox. Please consider my example:

    ComboBox:

    @(Html.Kendo().ComboBox()
                        .Name("cmbChopOwnerAssistance")
                        .DataTextField("Name")
                        .DataValueField("Id")
                        .HtmlAttributes(new { style = "width:380px;" })
                        .Filter("contains")                    
                    )

    In Javascript:

     $.ajax({
                url: '@Url.Action("LoadUsers", "List")',
                type: 'GET',
                cache: false,
                data: { UserId: AssistantId },
                success: function (data) {                                          
                    $("#cmbChopOwnerAssistance").kendoComboBox({
                        dataTextField: "Name",
                        dataValueField: "Id",
                        dataSource: data                    
                    });
                }
            });

     

    Thank you for your help.

  5. Roohul
    Roohul avatar
    6 posts
    Member since:
    Apr 2009

    Posted 22 Feb in reply to Roohul Link to this post

    Dear Kiril,

    It is resolved by using the following example:

    http://docs.telerik.com/kendo-ui/api/javascript/ui/combobox

    Thank you so much for your time.

  6. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2566 posts

    Posted 23 Feb Link to this post

    Hello Muhammad,

    I am happy to hear that the problem has been resolved. In case you have any further questions do not hesitate to contact us.

    Regards,
    Kiril Nikolov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET MVC is VS 2017 Ready