最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

slickgrid 5.15.1, autosize columns using slick.remotemodel.js - Stack Overflow

programmeradmin1浏览0评论

Using last version of 6pac/slickgrid 5.15.1, with slick.remotemodel.js

calling grid.autosizeColumns() in dataloaded model event

model.onDataLoaded.subscribe(function(e, args) {
     for (var i = args.from; i <= args.to; ++i) {
         grid.invalidateRow(i);
     }
     grid.updateRowCount();
     grid.render();        
     grid.autosizeColumns();
 });

results a

Uncaught TypeError: this.getDataItem(...) is undefined
        getRowVal slick.grid.ts:2679
        getColContentSize slick.grid.ts:2745
        getColAutosizeWidth slick.grid.ts:2608
        internalAutosizeColumns slick.grid.ts:2434
        autosizeColumns slick.grid.ts:2386

perhaps the wrong place where to call grid.autosizeColumns();? Thanks in advance

Using last version of 6pac/slickgrid 5.15.1, with slick.remotemodel.js

calling grid.autosizeColumns() in dataloaded model event

model.onDataLoaded.subscribe(function(e, args) {
     for (var i = args.from; i <= args.to; ++i) {
         grid.invalidateRow(i);
     }
     grid.updateRowCount();
     grid.render();        
     grid.autosizeColumns();
 });

results a

Uncaught TypeError: this.getDataItem(...) is undefined
        getRowVal slick.grid.ts:2679
        getColContentSize slick.grid.ts:2745
        getColAutosizeWidth slick.grid.ts:2608
        internalAutosizeColumns slick.grid.ts:2434
        autosizeColumns slick.grid.ts:2386

perhaps the wrong place where to call grid.autosizeColumns();? Thanks in advance

Share asked yesterday Sadri LassouedSadri Lassoued 587 bronze badges 0
Add a comment  | 

1 Answer 1

Reset to default 0

fixed in the model by synchronising data length in ajax response


success: function(response, status, jqXHR) 
{ 
  var from = jqXHR.fromPage * PAGE_SIZE; 
  var count = response.d.nodes.length; data.length = data.length + count;// instead of the total data response.d.totalNodes;
 //etc..
}
发布评论

评论列表(0)

  1. 暂无评论