get combobox currently typed text... angularJs

2 posts, 0 answers
  1. Boris
    Boris avatar
    7 posts
    Member since:
    Feb 2015

    Posted 27 Sep Link to this post

    I would like to be able to do custom server side filtering based on the text that the user types into the combobox instead of only relying on oData filtering.

    (I'm currently using web api with odata)

    Is there any way to get the text from the combox in angular.

    I've tried setting ng-model to a scope var, but it only changes when the selected item is changed, not when user types something.

     

    Can something like this be done?:

    read: {
             url: "/api/Items/searchItemThumbs", // <-- Get data from here.
             dataType: "json", // <-- The default was "jsonp".
             data: { text: $scope.comboText }
    },

     

  2. Stefan
    Admin
    Stefan avatar
    264 posts

    Posted 29 Sep Link to this post

    Hello Boris,

    If I understand the requirement correctly based on the provided information, I can suggest the following:

    1) To use the filtering event which will be fired when the user type to filter the ComboBox:

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

    2) Then use the text method of the ComboBox to retrieve the text value of the widget:

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

    I made a Dojo example demonstrating this implementation:

    http://dojo.telerik.com/evaCo

    I hope this will help to achieve the desired result.

    Regards,
    Stefan
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
  3. UI for ASP.NET AJAX banner
Back to Top