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

How to disable catching by Kendo grid

1 Answer 1273 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Niloofar
Top achievements
Rank 1
Niloofar asked on 29 Mar 2016, 03:09 PM
In my grid i have enabled virtual scrolling and server side paging. but as i was scrolling i noticed sometimes when i scroll its not sending a new request to grab new data even if its reached page size. I think its because of catching of data. I tried to set catch property to false in my ajax call but it didnt fix my issue. I was wondering how this can be done. does Kendo can provide us with a functionality?
var dataSource = {
    transport: {
        read: function (options) {
            var success = function (response) {
                options.success(response);
            };
 
            var error = function (xhr, status, error) {
                Ember.Logger.error('Fail response: ' + xhr.responseText + ' (status=' + xhr.status + ' ' + error + ')');
            };
            _this.get('PopulateGridData')(gridUrl, success, error, options.data, 'POST', true, true);
        },
    },
    pageSize: gridPageSize,
    schema: gridSchema,
    serverPaging: true,
    serverSorting: true,
    serverGrouping: true,
    serverFiltering: true,
};
 
var gridOptions = {
    dataSource: dataSource,
    columns: gridColumns,
    editable: gridEditable,
    pageable: {
        refresh: true,
        numeric: false,
        previousNext: false,
    },
    height: gridHeight,
    scrollable: {
        virtual: true,
    },
    groupable: true,
    filterable: true,            
};
 
var grid = Ember.$("#kendo-grid").kendoGrid(gridOptions).data('kendoGrid');
 
_this.set('kendoGrid', grid);

1 Answer, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 31 Mar 2016, 11:33 AM
Hello Niloofar,

You can set the transport.read.cache option of the Kendo UI Grid's dataSource to false to prevent caching the result of the request by the browser.

However there is another issue in the provided code sample - virtual scrolling is not supposed to be used in a combination with paging, grouping, hierarchy, and CRUD operations, and such scenarios are not supported. You can find more information in the corresponding section of our documentation:

http://docs.telerik.com/kendo-ui/controls/data-management/grid/appearance#virtual-scrolling

Let me know if you have further questions about the Kendo UI widgets.

Regards,
Dimiter Topalov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Niloofar
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question
or