可手动调节的动态设置 [英] Handsontable Dynamically Set Settings

查看:145
本文介绍了可手动调节的动态设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有很大的经验.我已经定义了下拉列,但是,使用AJAX检索了源的值.

I have a very big handsontable. I have dropdown columns defined, but, the values for the sources are retrieved with AJAX.

如何动态设置下拉"类型的列"的源"属性?

How can I set the "source" property of a "column" of type "dropdown" dynamically?

致谢!

推荐答案

您可以并且应该使用:

hotInstance.updateSettings({
  columns: getNewColumns()
})

getNewColumns()将在其中返回包含数据和新源的列数组(或从此处进行AJAX调用).那应该做!

Where getNewColumns() would return an array of columns with the data and new source (or make the AJAX call from in here). That should do it!

这篇关于可手动调节的动态设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆