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

Editable Grid manual dataItem.set() for checkbox binding is slow/delayed

1 Answer 307 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Fernando
Top achievements
Rank 1
Fernando asked on 29 Oct 2013, 01:18 PM
As I have posted here I have a problem with setting dataItem.set() manually.

I have an editable Kendo Grid that may have a column with a checkbox to change a boolean value. I have used this solution proposed by OnaBai that is working perfectly!

The only problem is that the checkbox value change is too slow. When user clicks it, it takes about 1 second to change. I realize that the dataItem.set() method is responsible by this delay.

My grid has a considerable amount of data. About 30-40 columns and 300+ lines. It is defined as follows:

$("#mainGrid").kendoGrid({
    dataSource: dataSource,
 
    pageable: false,
    sortable: true,
 
    scrollable: true,
    editable: true,
    autoBind: false,
    columnMenu: true, // Cria o menu de exibição de colunas
    height: getGridHeight(),
 
    toolbar: [/* hide for brevity */],
    columns: [/* hide for brevity */],
    dataBound: function() { /* hide for brevity. */},
    edit: function() { /* hide for brevity. */}
});
Another detail is that, when dataItem.set() is called, it calls dataBound() event but that is not causing the delay. Grid's edit() method is not being called on this process. I don't know if worths to post dataSource code.

Any help will be very appreciate. Thank you in adv.

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 31 Oct 2013, 07:27 AM
Hello Fernando,

You have huge amount of data loaded in your grid (30-40 columns with 300+ records) so it requires some time for processing and the delay that you observe is expected. Furthermore when you change one record in the grid, the whole grid is being redrawn which takes time.

Alternatively you can manually find the element in the grid and set its model, this way the grid will not be redrawn and should act faster.
 
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
Grid
Asked by
Fernando
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or