To create DataView with a paging area use the following code:
data = new dhtmlXDataView({
container:"data_container",
type:{
template:"#Package# : #Version#<br/>#Maintainer#",
height:40
},
pager:{
container:"paging_here",
size:20,
group:8
}
});
Pager object can contain the properties given below:
Related sample: Dynamic paging
var pager = view.config.pager;
pager.select(page_number);
var pager = view.config.pager;
pager.define("group",5); //set group as 5
pager.define("size",25); //25 objects per page
pager.refresh();
Configurable properties are:
//default
pager.define("template","{common.pages()}");
//custom
pager.define("template","{common.first()}{common.pages()}{common.last()}");
pager.define("template",
"{common.prev()}<div class='paging_text'>Page #page# from #limit#</div>{common.next()}");
Supported objects are:
The list of supported pager's events includes: