Close and Open kendo angular combobox from contoller.js

3 posts, 0 answers
  1. Ranjeeth
    Ranjeeth avatar
    4 posts
    Member since:
    Dec 2015

    Posted 20 Oct Link to this post

    Hello, i have a following kendo combobox with angular 1.5 integration. I want to open and close the combobox in my contoller.js. Can you please help me with that.

     

    <select id="cmbCostCenter"
                            name="cmbCostCenter"
                            kendo-combo-box
                            class="form-control"
                            k-placeholder="'Cost Center'"
                            k-filter="'contains'"
                            k-min-length="4"
                            k-data-text-field="'costCenterDisplayName'"
                            k-data-value-field="'sapCostCenterID'"
                            k-data-source="costCenters"
                            k-on-change="costCenterOnChange(costCenterForm)"
                            k-ng-model="data.costcenters.selectedCostCenter"
                            ng-disabled="!data.appUser.pluginPermissions.isPluginAdmin"
                            ng-show="showCB"
                            style="width: 100%; background: white;"
                            required></select>

  2. Nencho
    Admin
    Nencho avatar
    1669 posts

    Posted 24 Oct Link to this post

    Hello Ranjeeth,

    In order to acheive the desired functionality, you should get a reference to the kendo combobox object trough the $scope and use the Client API of the widget to perform the needed (any any other) operations:

    - open method - https://docs.telerik.com/kendo-ui/api/javascript/ui/combobox#methods-open
    - close method - https://docs.telerik.com/kendo-ui/api/javascript/ui/combobox#methods-close

    In addition, I have prepared a dojo example for your convenices, where the above suggested implementation is demonstrated:

    http://dojo.telerik.com/@nenchef/ufeZoh/5

    Hope this information helps.

    Regards,
    Nencho
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Ranjeeth
    Ranjeeth avatar
    4 posts
    Member since:
    Dec 2015

    Posted 24 Oct in reply to Nencho Link to this post

    Thank you!
Back to Top