I’m attempting to configure my grid using the Native JSON format following the docs from here:
docs.dhtmlx.com/grid__json_configuration.html
My JSON:
{
"head": [{
"id": "siteCode", "width": 60, "type": "ro",
"align": "left", "sort": "int", "value": "Site Code"
}, {
"id": "originalBudget", "width": 100, "type": "ron", "align": "left",
"sort": "str", "format": "$0.00", "value": "Original Budget"
}, {
"id": "budgetModifications", "width": "100", "type": "ron", "align": "right",
"sort": "int", "format": "$0.00", "value": "Budget Modifications"
}, {
"id": "revisedBudget",
"width": 100, "type": "ron", "align": "left",
"sort": "str", "format": "$0.00", "value": "Revised Budget"
}, {
"id": "pendingBudgetChanges", "width": 100, "type": "ron", "align": "left",
"sort": "str", "format": "$0.00", "value": "Pending Budget Changes"
}, {
"id": "projectedBudget", "width": 100, "type": "ron", "align": "left",
"sort": "str", "format": "$0.00", "value": "Projected Budget"
}, {
"id": "committedCosts", "width": 100, "type": "ron", "align": "left",
"sort": "str", "format": "$0.00", "value": "Committed Costs"
}, {
"id": "approvedCos", "width": 100, "type": "ron", "align": "left",
"sort": "str", "format": "$0.00", "value": "Approved Changes"
}, {
"id": "revisedCommitments", "width": 100, "type": "ron", "align": "left",
"sort": "str", "format": "$0.00", "value": "Revised Commitments"
}, {
"id": "pendingCostChanges", "width": 100, "type": "ron", "align": "left",
"sort": "str", "format": "$0.00", "value": "Pending Cost Changes"
}, {
"id": "projectedCosts", "width": 100, "type": "ron", "align": "left",
"sort": "str", "format": "$0.00", "value": "Projected Costs"
}, {
"id": "forecastToComplete", "width": 100, "type": "ron", "align": "left",
"sort": "str", "format": "$0.00", "value": "Forecast to Complete"
}, {
"id": "eac", "width": 100, "type": "ron", "align": "left",
"sort": "str", "format": "$0.00", "value": "Estimate at Completion"
}],
"data": [{
"originalBudget": 18230000,
"budgetModifications": 0,
"revisedBudget": 18230000,
"pendingBudgetChanges": 0,
"projectedBudget": 18230000,
"committedCosts": 18730000,
"approvedCos": 0,
"revisedCommitments": 18730000,
"pendingCostChanges": 0,
"projectedCosts": 18730000,
"forecastToComplete": -500000,
"eac": 18730000,
"siteCode": "000",
"id": 1
}]
}
I have tried
grid.parse(data, 'json');
as well as
grid.parse(data,'js');
I get the header configured, but no rows.
Thank you,
Kevin