jquery - Kendo grid : Slow performance issue -


the issue slow performance in kendo grid, when trying load 1000+ records grid takes 8 seconds load. can see controller returns json data in 3 seconds , kendo grid takes time populate.

i have pagesize of 500 records , used datasourcerequest, data each page returned controller. still no joy.

can please advice me how can improve grid performance.

please find code below

 @(html.kendo().grid<model>() .name("kendotestgrid")      .columns(columns => {      columns.bound(p => p.column5)           .width("18%")                        .clienttemplate("#= formatresult(format(column5, '')) #")           .editortemplatename("column5")           .clientfootertemplate("<span href='\\#'  id='total'>total : </span>");                  columns.bound(p => p.column6)          .editortemplatename("column6")          .clienttemplate("#= format(column6, '') #")                                 .clientfootertemplate("<span href='\\#' id='spanfooter'></span>")                       .width("23%");     columns.bound(p => p.column7)                       .clienttemplate("<span href='\\#'  id='#=id #'>#= format(column7,'')#</span>")          .clientfootertemplate("<span href='\\#'  id='spansum'></span>")          .htmlattributes(new { class = "number" })          .width("18%");     columns.bound(p => p.column8)          .editortemplatename("column8")                      .clientfootertemplate("total:")          .clientfootertemplate("<span href='\\#'  id='totalsum1'></span>")                     .width("23%");       })  .datasource(datasource => datasource     .ajax()           .batch(true)     .serveroperation(true)           .read(read => read.action("action", "controller").data("getdata"))     .create(c => c.action("action", "controller").data("getdata2"))     .update(update => update.action("action", "controller").data("getdata3"))     .pagesize(500) .events(x => x.databound("ongriddatabound")     .edit("ongridedit")     .change("ongridchange"))        .editable(editing => editing.mode(kendo.mvc.ui.grideditmode.incell))      .filterable()     .groupable()            .sortable()     .scrollable()     .pageable()     .selectable(s => s.mode(gridselectionmode.single).type(gridselectiontype.row))     .resizable(resize => resize.columns(true))     .autobind(false) ) 

we need have @ controller/action code have.

it depends sometime on container return data in, experience best performance kendo grid need use iqueryable container , run todatasourceresult function against container.

public actionresult action([datasourcerequest] datasourcerequest request, string extraparameters) {     dbcontext db = new dbcontext();     iqueryable<model> models = db.models;     return json((models).todatasourceresult(request)); } 

edit: turn off serveroperation(true) option


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -