JSP
</table>
mygrid = new dhtmlXGridObject(‘pref’);
mygrid.setImagePath(“/dhtmlx/codebase/imgs/dhxgrid_dhx_skyblue/”); //the path to images required by grid
mygrid.setHeader(“Portfolio,Scope Selection,Portfolio ID,Scope ID”); //the headers of columns
mygrid.setColumnIds(“portfolio,scope,portfolioID,scopeID”); //Attributes of the extended dhtmlxGrid-oriented JSON format
mygrid.setInitWidths(“150,,,*”); //the widths of columns
mygrid.setColAlign(“left,left,left,left”); //the alignment of columns
mygrid.setColTypes(“rotxt,rotxt,rotxt,rotxt”); //the types of columns
mygrid.setColSorting(“str,str,str,str”); //the sorting types
//mygrid.enableAutoWidth(true); //enable auto width mode
//hide the first column
mygrid.setColumnHidden(2,true);mygrid.setColumnHidden(3,true);
//this code enables paging and sets its skin
mygrid.enablePaging(true,10,5,“pagingArea”,true,“recinfoArea”);
//mygrid.enablePaging(true,10,10,“pagingArea”,true);
//mygrid.enablePaging(true,15,5,“recinfoArea”,true,“”);
mygrid.setPagingSkin("toolbar","dhx_skyblue")
toolbar = new dhtmlXToolbarObject(“pagingArea”, “dhx_skyblue”);
//mygrid.changePageRelative(-1);
mygrid.setSkin(“modern”);
mygrid.init(); //finishes initialization and renders the grid on the page
//var isEmpty = isObjectEmpty(data);
// if(isEmpty)
mygrid.parse(rows,“js”); //takes the name and format of the data source
mygrid.attachEvent(“onRowDblClicked”, function(rId,cInd){
onClickUserPreference(mygrid.cells(mygrid.getSelectedId(),2).getValue(),mygrid.cells(mygrid.getSelectedId(),0).getValue(),mygrid.cells(mygrid.getSelectedId(),3).getValue())
});
}
Grid is working fine ,but not able get the pagination .when click on any grid functionality then only pagination enable.
Can you please guide how to enable the pagination on load
No records Found... |
|