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

Kendo UI Grid/Angular refreshing issues

1 Answer 223 Views
Integration with other JS libraries
This is a migrated thread and some comments may be shown as answers.
LD
Top achievements
Rank 1
LD asked on 26 May 2015, 02:09 PM

Hi,

I ran into an issue of the Kenod UI Grid not refreshing when using Angular directives.  It displays the results of the first search even when the datasource contains the new data.  I am using Angular 1.3.15 and the latest version of Kendo UI.

The code:

<div kendo-grid scrollable="true"
                     pageable="true" sortable="true"
                     options="vm.gridOptions" k-ng-delay="vm.gridOptions"
                     >
                </div>

function search() {
            
            dataservice.searchClaims(vm.selectedColumn, vm.selectedOption, vm.searchValue)
                .then(searchSuccess)
                .catch(errorCallback)
            ;

            function searchSuccess(response) {               
                vm.gridOptions = {
                    dataSource: new kendo.data.DataSource({
                        data: response,
                        pageSize: 10,
                        pageable: true
                    }),
                    selectable: 'row',
                    columns: common.claimSearch.gridColumns
                }             
               
            }
        };

Could someone advise?

Thank you.

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 28 May 2015, 07:37 AM

Hello LD,

How do you update the data, as it is not quite clear from the code that you posted? Do you change the data in the dataSource or the response array? Maybe what you need is the k-rebind directive that is explained here:

http://docs.telerik.com/kendo-ui/AngularJS/introduction#updating-widgets-when-options-change

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Integration with other JS libraries
Asked by
LD
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or