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
answered on 19 Mar 2019, 06:35 PM
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:
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.
answered on 25 Mar 2019, 02:07 PM
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.
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.