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/