The typical pagination way to deal with huge dataset an alternative for the default virtual scrolling manner.
| Parameter | Type | Description |
|---|---|---|
| inGrid | dojox/grid/EnhancedGrid | The grid to plug in to. |
| option | undefined |
Which page will be displayed initially, 1st page by default.
Number of rows in a page, 25 by default.
Whether the description information will be displayed, true by default.
Whether the goto page button will be displayed, false by default.
The max number of page sizes to be displayed, 7 by default.
Plugin properties - leveraged with default and user specified properties. e.g. for dnd plugin, it may look like {"class": dojox.grid.enhanced.plugins.DnD, "dependency": ["nestedSorting"], ...}
Array of page sizes for switching, e.g. [10, 25, 50, 100, Infinity] by default, Infinity or any NaN value will be treated as "all".
Whether the page switch options will be displayed, true by default.
The position of the pagination bar - "top"|"bottom", "bottom" by default.
Private properties/methods shouldn't be mixin-ed anytime.
Whether the page size switch options will be displayed, true by default.
| Parameter | Type | Description |
|---|---|---|
| size | undefined |
Connects specified obj/event to specified method of this object.
| Parameter | Type | Description |
|---|---|---|
| obj | undefined | |
| event | undefined | |
| method | undefined |
var plugin = new dojox.grid.enhanced._Plugin(grid,"myPlugin",{...});
// when foo.bar() is called, call the listener in the scope of plugin
plugin.connect(foo, "bar", function(){
console.debug(this.xxx());//"this" - plugin scope
});
Shift to the given page, return current page number. If there is no valid page was passed in, just return current page num.
| Parameter | Type | Description |
|---|---|---|
| page | Integer | The page to go to, starting at 1. |
Current page number
Change the size of current page or return the current page size.
| Parameter | Type | Description |
|---|---|---|
| size | Integer | null | An integer identifying the number of rows per page. If the size is an Infinity, all rows will be displayed; if an invalid value passed in, the current page size will be returned. |
Current size of items per page.
Disconnects handle and removes it from connection list.
| Parameter | Type | Description |
|---|---|---|
| handle | undefined |
Function for get total row count
| Parameter | Type | Description |
|---|---|---|
| page | undefined |
Override the grid.scrollToRow(), could jump to the right page and scroll to the specific row
| Parameter | Type | Description |
|---|---|---|
| inRowIndex | integer | The row index |
For show/hide the go to page button dynamically
| Parameter | Type | Description |
|---|---|---|
| flag | boolean | Show the go to page button when flag is true, otherwise hide it |
Subscribes to the specified topic and calls the specified method of this object.
| Parameter | Type | Description |
|---|---|---|
| topic | undefined | |
| method | undefined |
var plugin = new dojox.grid.enhanced._Plugin(grid,"myPlugin",{...});
// when /my/topic is published, call the subscriber in the scope of plugin
// with passed parameter - "v"
plugin.subscribe("/my/topic", function(v){
console.debug(this.xxx(v));//"this" - plugin scope
});
Un-subscribes handle and removes it from subscriptions list.
| Parameter | Type | Description |
|---|---|---|
| handle | undefined |
var plugin = new dojox.grid.enhanced._Plugin(grid,"myPlugin",{...});
// when /my/topic is published, call the subscriber in the scope of plugin
// with passed parameter - "v"
plugin.subscribe("/my/topic", function(v){
console.debug(this.xxx(v));//"this" - plugin scope
});
| Parameter | Type | Description |
|---|---|---|
| item | undefined | |
| parentInfo | undefined |
var plugin = new dojox.grid.enhanced._Plugin(grid,"myPlugin",{...});
// when /my/topic is published, call the subscriber in the scope of plugin
// with passed parameter - "v"
plugin.subscribe("/my/topic", function(v){
console.debug(this.xxx(v));//"this" - plugin scope
});
var plugin = new dojox.grid.enhanced._Plugin(grid,"myPlugin",{...});
// when /my/topic is published, call the subscriber in the scope of plugin
// with passed parameter - "v"
plugin.subscribe("/my/topic", function(v){
console.debug(this.xxx(v));//"this" - plugin scope
});
var plugin = new dojox.grid.enhanced._Plugin(grid,"myPlugin",{...});
// when /my/topic is published, call the subscriber in the scope of plugin
// with passed parameter - "v"
plugin.subscribe("/my/topic", function(v){
console.debug(this.xxx(v));//"this" - plugin scope
});
Called when store is changed.
| Parameter | Type | Description |
|---|---|---|
| store | undefined |
var plugin = new dojox.grid.enhanced._Plugin(grid,"myPlugin",{...});
// when /my/topic is published, call the subscriber in the scope of plugin
// with passed parameter - "v"
plugin.subscribe("/my/topic", function(v){
console.debug(this.xxx(v));//"this" - plugin scope
});
var plugin = new dojox.grid.enhanced._Plugin(grid,"myPlugin",{...});
// when /my/topic is published, call the subscriber in the scope of plugin
// with passed parameter - "v"
plugin.subscribe("/my/topic", function(v){
console.debug(this.xxx(v));//"this" - plugin scope
});