how to use dojox datagrid in xpages? If anyone have code snippet please send it to me at
[email protected]
I am trying with the following code but getting nothing at the output:
<xp:this.resources>
<xp:dojoModule name="dojox.
grid.DataGrid"></xp:dojoModule>
<xp:dojoModule name="dojox.
grid"></xp:dojoModule>
</xp:this.resources>
<xp:panel >
<xp:scriptBlock id="scriptBlock1">
<xp:this.value><![CDATA[makeGrid = function(){
dojo.require("dijit.form.Button");
dojo.require("dojox.
grid.DataGrid");
var subrow1 = [{name: "Product Title"}, {name: "Price"}, {name: "Type"}];
var view = {rows: [ subrow1 ]};
var structure = [ view ];
var data = [
["Baseball gloves", 12.34, "Sports"],
["Tennis ball", 5.99, "Sports"],
["T-shirt", 12.45, "Clothing"],
["Hat", 12.45, "Clothing"]
];
var productModel = new dojox.
grid.data.Table(null, data);
productModel.render();
};
XSP.addBeforeLoad(makeGrid);]]
<div dojoType="dojox.
Grid" autoWidth="true" model="productModel"
structure="structure"
</xp:panel>
Please help !!