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

How to refresh list items?

1 Answer 78 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 18 Mar 2021, 07:35 PM

Hi,

I tried the following code to refresh the list items of a ComboBox widget, but it didn't work.  It didn't trigger a data retrieval call.  Not sure what's wrong.

    widget.dataSource.read();
    widget.refresh();

 

The data source is created as follows:

new kendo.data.DataSource({
    serverFiltering: true
    transport: {
        read: {
            url: "xxxx",
            dataType: "json",
            data: function (e) {
                // some code to dynamically prepare the call parameters
            },
            type: "POST"
        }
    },
    schema: {
        data: function (response) {
            if (response != null) {
                var result = JSON.parse(response);
                return (result.Data != null ? result.Data : "");
            } else {
                return "";
            }
        }
    }
});

 

Please advise.  Thanks.

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 23 Mar 2021, 02:40 PM

Hello, Ben,

The read method of the dataSource should trigger a Read request to the service. Could you please modify this small Dojo example to reproduce the issue you are experiencing? I will then be able to provide more information on the matter.

Looking forward to your reply.

Regards,
Martin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
ComboBox
Asked by
Ben
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or