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

Combobox loader not stop on loading data.

3 Answers 518 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Bhautik
Top achievements
Rank 1
Bhautik asked on 16 Mar 2019, 12:04 PM

Hello,

I have one custom grid and in each cell I have one comboBox.On combobox open event I load the data to datasource from api but if server returns no content or bad request combobox loader is not getting stop.So how to stop manually loader if there is error while getting data from api.

3 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 19 Mar 2019, 06:35 PM
Hello Bhautik,

If the request to the service fails the DataSource's error event fires. After that the ComboBox' loading icon should automatically disappear. If for some reason it doesn't disappear it can be hidden through jQuery's hide method:
$(".k-combobox .k-i-loading").hide();

See the following dojo example.

Regards,
Ivan Danchev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Bhautik
Top achievements
Rank 1
answered on 22 Mar 2019, 07:46 AM
Yes,It will work if there is only one ComboBox,but I have one column in grid and in each cell I have one ComboBox.So how can I stop particular cell's comboBox loader.
0
Ivan Danchev
Telerik team
answered on 25 Mar 2019, 02:07 PM
Hello Bhautik,

The suggested approach is applicable to all ComboBoxes in a Grid column since the selector uses the pre-defined ".k-combobox" class, which is applied to every ComboBox instance's wrapping DOM element. Here's a dojo example, in which each cell of the Category column contains a ComboBox (it is shown on clicking the cell to edit its value).

Note that line that calls the hide() method in the error event handler is commented, to demonstrate that even without calling it the loader icon is automatically hidden when there is an error in retrieving the data.

Regards,
Ivan Danchev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
ComboBox
Asked by
Bhautik
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Bhautik
Top achievements
Rank 1
Share this question
or