gpt4 book ai didi

javascript - 如何在 DHTMLX 网格版本 6 中添加自定义列

转载 作者:行者123 更新时间:2023-12-01 01:31:01 26 4
gpt4 key购买 nike

   function BindDataToGrid() {
var grid = new dhx.Grid("grid_container", {
columns: [
{ width: 150, id: "ProductCode", header: [{ text: "<span class='title'>Product Code</span>" }] },
{ width: 200, id: "ProductName", header: [{ text: "Product Name" }] },
{ width: 200, id: "ProductManufacturedDate", header: [{ text: "Manufacturing Date" }] },
{ width: 150, id: "ProductPrice", header: [{ text: "Price" }] },
//Add custom column here for edit and delete purpose
],
headerRowHeight: 50,
width: 800,
height: 400,
data: dataset,
resizable: true
});
}

我想要在产品价格列之后自定义列。请帮助我。

最佳答案

对于网格列中的自定义显示内容,您可以尝试使用网格列模板。如以下示例所示: https://docs.dhtmlx.com/suite/samples/grid/02_configuration/02_cell_templates.html

关于javascript - 如何在 DHTMLX 网格版本 6 中添加自定义列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59733890/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com