【问题标题】:How to set dynamic column title in Metronic datatable?如何在 Metronic 数据表中设置动态列标题?
【发布时间】:2019-03-16 13:33:28
【问题描述】:

我们正在使用 Metronic 数据表,我们需要动态设置列标题。

这是我的例子:

columns: [{
            field: "id",
            title: "#",
            sortable: !1,
            width: 40,
            textAlign: "center",
            selector: {
                class: "m-checkbox--solid m-checkbox--brand"
            }
        }, {
            field: "username",
            title: "Username"
        }, [enter image description here][1] {
            field: "sector_1",
            title: "sector_1",
            width: 70,
        },
     }]

我们需要显示标题sector_1 => 'XYZ'

Datatable image here

非常感谢任何基于官方来源的建议。

【问题讨论】:

    标签: jquery datatables metronic


    【解决方案1】:

    您可以使用 ajax 进行动态处理。 例如:https://datatables.net/examples/data_sources/ajax.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-09-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多