The OmniGrid component is inspired by two similar components FlexGrid jQuery and phatfusion:sortableTable and partly use their source code. It is developed because of lack of powerfull DataGrid for Mootools 1.2 library. Response from dynamic scripts (php, asp, …) that returns data from database must be in JSON format like this:
Omnigrid will send following variables via POST method: [page, perpage, [sorton,sortby] (only if serverSort option is true) ] http://www.omnisdata.com/omnigrid/ Download:http://www.omnisdata.com/omnigrid/omnigrid1.2.3.zip http://www.omnisdata.com/omnigrid/
Omnigrid – Advanced DataGrid for Mootools by Omnisdata Ltd is licensed under a
Methods
<ul>
<li>constructor(el, options:Object):Object - el HTML element or string (element id), options (see Usage section)</li>
<li>refresh():Nothing</li>
<li>loadData(url:String):Nothing</li>
<li>setData(data:Array):Nothing</li>
<li>setColumnModel(columnModel:Object):Nothing</li>
<li>getDataByRow():Object</li>
<li>setDataByRow(index:Number, data:Object):Nothing</li>
<li>getSelectedIndices():Array</li>
<li>removeAll():Nothing</li>
<li>filter(key:String):Nothing</li>
<li>clearFilter():Nothing</li>
<li>gotoPage(page:Number):Nothing</li>
<li>setPerPage(perpage:Number):Nothing</li>
</ul>
Events
<ul>
<li>click - on row click</li>
<li>dblclick - on row double click</li>
</ul>
Database response from server-script to Omnigrid
{"page":"1","total":"101","data":[{object},{object},{object},{object},...]}
Database request from Omnigrid to server-script
Column model
var cmu = [
{
header: "Column name",
dataIndex: 'database_attribut_name',
dataType:'number|string|date',
hidden:true|false,
width:Number // column default width
},
{Object},
{Object},
...
]
Source:

Related Listings:
RSS feed for comments on this post. TrackBack URL
November 16th, 2009 at 2:06 pm
[...] OmniGrid – Advanced DataGrid for Mootools The OmniGrid component is inspired by two similar components FlexGrid… [...]