【问题标题】:Handsontable how redraw col borders after insert new rowHandsontable 如何在插入新行后重绘 col 边框
【发布时间】:2018-03-01 08:56:27
【问题描述】:

我有handson table,我的同一个col有自定义边框

自定义边框:[{

              range: {from:{row:0,col:5},to:{row:_rowsCount,col:7}},
              left: {width: 2,color: '#5292F7'},
              right: {width: 2,color: '#5292F7'}

}]

afterCreateRow 我的边框不重绘,最后一行没有我的自定义边框

我该如何解决?

【问题讨论】:

    标签: border handsontable


    【解决方案1】:

    你需要调用渲染函数。

    myHoT.render();
    

    【讨论】:

    • 我在创建新行后调用,但最后一行没有我的边框
    【解决方案2】:
    afterCreateRow : function(index, amount, source) {
     _rowsCount += 1;
     handsontable.updateSettings({
      customBorders:  [{range: {from:{row:0,col:5},to:{row:_rowsCount,col:7}},
                        left: {width: 2,color: '#5292F7'},
                        right: {width: 2,color: '#5292F7'}
                      }],
     });
     handsontable.render();
    });
    

    不工作!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-03-21
      • 2015-10-02
      • 2016-01-20
      • 2018-05-08
      • 1970-01-01
      • 1970-01-01
      • 2012-01-03
      • 1970-01-01
      相关资源
      最近更新 更多