Home > Article > Web Front-end > jQuery table plug-in ParamQuery simple usage example_jquery
Implementation steps:
First add references to jQuery and jQuery UI in the head of the html:
Add a reference to Param Query Grid:
Add script code:
var obj = {};
obj.width = 700;
obj.height = 400;
obj.colModel = [ { title: "Rank", width: 100, dataType: "integer "}, {title:" company ", width: 200, dattype:" string "},
{title:" revenues ($ miss) ", width: 150, datatype:" float ", align: "right" },
{ title: "Profits ($ millions)", width: 150, dataType: "float", align: "right" }];
obj.dataModel = { data: data };
$("#grid_array").pqGrid(obj);
Demo added with Theme skin
There is no change in the logic part of the js code, haha.
Add a style reference to the head part of the html and you’re done, as follows: