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

Close and Open kendo angular combobox from contoller.js

2 Answers 89 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Ranjeeth
Top achievements
Rank 1
Ranjeeth asked on 20 Oct 2017, 06:20 PM

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 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 24 Oct 2017, 07:34 AM
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.
0
Ranjeeth
Top achievements
Rank 1
answered on 24 Oct 2017, 01:23 PM
Thank you!
Tags
ComboBox
Asked by
Ranjeeth
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Ranjeeth
Top achievements
Rank 1
Share this question
or