Hi,
I try to create a knockout custom binding for ejGrid.
The data are plumbed into the code only for testing purposes (I reused those on your example).
When I run the code I have this error: Cannot call method 'helpers' of undefined
This is the code I used from one of yours example:
ko.bindingHandlers.ejgrid = {
init: function (element, valueAccessor, allBindingsAccessor) {
var data = [{ "OrderID": 10248, "CustomerID": "VINET", "EmployeeID": 5, "OrderDate": new Date(836418600000), "ShipName": "Vins et alcools Chevalier", "ShipCity": "Reims", "ShipAddress": "59 rue de l\u0027Abbaye", "ShipRegion": null, "ShipPostalCode": "51100", "ShipCountry": "France", "Freight": 32.3800, "Verified": true }];
$(element).ejGrid({
dataSource: data,
columns: [
{ field: "OrderID", headerText: "Order ID", key: true, textAlign: ej.textAlign.Right, width: 75 },
{ field: "CustomerID", headerText: "Customer ID", width: 80 },
{ field: "EmployeeID", headerText: "Employee ID", textAlign: ej.textAlign.Right, width: 75 },
{ field: "Freight", headerText: "Freight", textAlign: ej.textAlign.Right, width: 75, format: "{0:C}" },
{ field: "OrderDate", headerText: "Order Date", width: 80, textAlign: ej.textAlign.Right, format: "{0:MM/dd/yyyy}" },
{ field: "ShipCity", headerText: "Ship City", width: 110 }
]
});
}
}
Thank you,
Mirko