Form grid bind problem

Im trying to get a form to bind to a grid. I get the following error Microsoft JScript runtime error: Object doesn’t support property or method ‘bind’.

Please help The bind is near the bottom of page

Thanks in advance

Here is the code

<br/>
<br/>
<h2>Items</h2>
<div id="Itemgrid_container" style="width:1100px;height:150px;"></div>
<input type="button" value="Init Form" onclick="Item_Form();">

<div id="Item_form" style="width:400px;height:200px;"></div>
<div id="Inv_form" style="width:400px;height:200px;"></div>
<body onload="doInitGrid()">
var InvForm = null; var myForm = null; var Itemgrid = null; var total = null; var ttl = null; function AddInv(tst) { var selectedItem = Itemgrid.getSelectedRowId(); formData = [ {type: "settings", position: "label-left", labelWidth: 100, inputWidth: 120}, {type: "fieldset", label: "Items", inputWidth: "auto", list:[ {type: "input", label: "Add to ", name: "add", value: ""}, {type: "input", label: "Take from ", name: "subt", value: ""}, {type: "input", label: "Test ", name: "test", value: ""}, {type: "button", value: "Save", name: "save"}, {type: "button", value: "Cancel", name: "cancel"} ]} ]; InvForm = new dhtmlXForm("Item_form", formData); InvForm.setSkin("dhx_skyblue"); var InvFormdp = new dataProcessor("php/data_items.php"); InvFormdp.init(InvForm); InvForm.attachEvent("onButtonClick", function(id){ var add = InvForm.getItemValue("add"); var subt = InvForm.getItemValue("subt"); subt = (subt == "")? 0 : parseInt(subt); tst = (tst == "") ? 0 : parseInt(tst); add = (add == "") ? 0 : parseInt(add); var ttl = ((tst + add) - subt); InvForm.setItemValue("test",ttl); myForm.setItemValue("Qtyonhand",ttl); InvForm.unload(); InvForm = null; myForm.save(); myForm.setSkin("dhx_skyblue"); }); } function Itemaddrow() { Itemgrid.addRow(mygrid.uid(),["",""],2); } function SaveRow() { mygriddp.sendData(); } function doInitGrid() { Itemgrid = new dhtmlXGridObject('Itemgrid_container'); Itemgrid.setImagePath("dhtmlx/dhtmlxgrid/codebase/imgs/"); Itemgrid.setHeader("Name,Category,Itemtype,Description,Account,Active,Notes,Qtyonhand,Reorder,BUnit,SUnit,Price,Vendor,Date,CustID,Perishable"); Itemgrid.setInitWidths("*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*"); Itemgrid.setColAlign("left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left"); Itemgrid.setSkin("light"); Itemgrid.setColumnId("Name,Category,Itemtype,Description,Account,Active,Notes,Qtyonhand,Reorder,BUnit,SUnit,Price,Vendor,Date,CustID,Perishable"); Itemgrid.load("php/connector_Item.php"); Itemgrid.init(); var Itemdp = new dataProcessor("php/connector_Item.php"); Itemdp.init(Itemgrid); Itemdp.setUpdateMode("cell",true) Itemdp.setDataColumns("true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true"); } function Item_Form() { var selectedItem = Itemgrid.getSelectedRowId(); formData = [ {type: "settings", position: "label-left", labelWidth: 100, inputWidth: 120}, {type: "fieldset", label: "Items", inputWidth: "auto", list:[ {type: "input", label: "Name", name: "Name", value: ""}, {type: "input", label: "Category", name: "Category", value: ""}, {type: "input", label: "Quantity", name:"Qtyonhand", value: ""}, {type: "button", value: "Adjust", name: "adj"} ]} ]; myForm = new dhtmlXForm("Item_form", formData); myForm.setSkin("dhx_skyblue"); myForm.load("php/data_items.php?id=" + selectedItem); myForm.bind(Itemgrid); myForm.attachEvent("onButtonClick", function(id){ var tst = myForm.getItemValue("Qtyonhand"); var ttl = AddInv(tst); }); }

You need to include datastore.js ( or use compiled dhtmlx.js ) to enable data binding

[code]…

…[/code]