Reputation: 31
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
});
}
i want custom columns after product price column. Please help me .
Upvotes: 3
Views: 507
Reputation: 504
For the custom displaying content in the grid column you may try to use the template for the grid column. As in the following sample: https://docs.dhtmlx.com/suite/samples/grid/02_configuration/02_cell_templates.html
Upvotes: 1