Provides nested sorting feature
A flexible way to control multiple column sorting, including
<script type="text/javascript"> var grid = new dojox.grid.EnhancedGrid({plugins : {nestedSorting: true}}, sortFields: [{attribute: 'col4', descending: false},...],//set default sorting order canSort: function(index, field){ return true},//disable sorting for a column ... }, dojo.byId('gridDiv')); grid.startup(); //set new sorting order grid.setSortIndex([{attribute: 'col3', descending: true},...]) </script>
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"], ...}
Private properties/methods shouldn't be mixin-ed anytime.
Parameter | Type | Description |
---|---|---|
e | undefined |
Parameter | Type | Description |
---|---|---|
region | undefined |
Parameter | Type | Description |
---|---|---|
cellIdx | undefined |
Overwritten, see _FocusManager.focusHeader()
Parameter | Type | Description |
---|---|---|
e | undefined |
Focus the given region
Parameter | Type | Description |
---|---|---|
region | undefined |
Parameter | Type | Description |
---|---|---|
node | undefined |
Parameter | Type | Description |
---|---|---|
region | undefined |
Parameter | Type | Description |
---|---|---|
region | undefined |
Initiate sort for each header cell node
Parameter | Type | Description |
---|---|---|
node | undefined |
Initiate sorting
Parameter | Type | Description |
---|---|---|
postSort | undefined |
Parameter | Type | Description |
---|---|---|
sortInfo | undefined | |
grid | undefined |
Prepare the nested sorting, this will order the column on existing sorting result.
Parameter | Type | Description |
---|---|---|
cellIdx | undefined |
Prepare the single sort, also called main sort, this will clear any existing sorting and just sort the grid by current column.
Parameter | Type | Description |
---|---|---|
cellIdx | undefined |
Parameter | Type | Description |
---|---|---|
grid | undefined |
Parameter | Type | Description |
---|---|---|
inIndex | undefined | |
inAsc | undefined | |
noRefresh | undefined |
Update the column header UI based on current sorting state. Show indicator of the sorting order of the column, no order no indicator
Parameter | Type | Description |
---|---|---|
node | 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 });
Disconnects handle and removes it from connection list.
Parameter | Type | Description |
---|---|---|
handle | undefined |
Overwritten, see DataGrid.getSortProps()
Parameter | Type | Description |
---|---|---|
cellIndex | undefined |
Parameter | Type | Description |
---|---|---|
cellIndex | undefined |
Parameter | Type | Description |
---|---|---|
cellIdx | undefined |
Set sorting data for a column.
Parameter | Type | Description |
---|---|---|
cellIdx | undefined | |
attr | undefined | |
value | undefined |
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 |
Update nested sorting after column moved
Parameter | Type | Description |
---|---|---|
type | undefined | |
mapping | 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 });
See dojox.grid.enhanced._Events._onHeaderCellClick()
Parameter | Type | Description |
---|---|---|
e | 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 });
See dojox.grid.enhanced._Events._onHeaderCellMouseOut()
Parameter | Type | Description |
---|---|---|
e | 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 });
See dojox.grid._Events._onHeaderCellMouseOver() When user mouseover other columns than sorted column in a single sorted grid, We need to show 1 in the sorted column
Parameter | Type | Description |
---|---|---|
e | 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 |
---|---|---|
e | undefined | |
isBubble | 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 |
---|---|---|
rowStep | undefined | |
colStep | undefined | |
e | 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 |
---|---|---|
sourceViewIndex | undefined | |
destViewIndex | undefined | |
cellIndex | undefined | |
targetIndex | undefined | |
before | 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 });
If the click target is single sort button, do single sort. Else if the click target is nested sort button, do nest sort. Otherwise return.
Parameter | Type | Description |
---|---|---|
e | 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 });