dojox/grid/enhanced/plugins/Rearrange (version 1.10)

dojox/grid/enhanced/_Plugin

Summary

Provides a set of method to re-arrange the structure of grid.

Usage

var foo = new Rearrange(grid,args);
dojox/grid/enhanced/plugins/Rearrange
Parameter Type Description
grid undefined
args undefined

Property Summary

  • _connectsList of all connections.
  • _subscribesList of all subscribes.
  • gridGrid that the plugin belongs to
  • nameplugin name
  • optionPlugin 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"], ...}
  • privatesPrivate properties/methods shouldn't be mixin-ed anytime.

Method Summary

  • _getPageInfo() Find pages that contain visible rows
  • _hasIdentity(points)
  • changeCells(sourceGrid,cellsToMove,target)
  • clearCells(cellsToClear)
  • connect(obj,event,method) Connects specified obj/event to specified method of this object.
  • copyCells(cellsToMove,target)
  • destroy()
  • disconnect(handle) Disconnects handle and removes it from connection list.
  • init()
  • insertRows(sourceGrid,rowsToMove,targetPos)
  • moveCells(cellsToMove,target)
  • moveColumns(colsToMove,targetPos) Move a set of columns to a given position.
  • moveRows(rowsToMove,targetPos) Move a set of rows to a given position
  • removeRows(rowsToRemove)
  • setArgs(args)
  • subscribe(topic,method) Subscribes to the specified topic and calls the specified method of this object.
  • unsubscribe(handle) Un-subscribes handle and removes it from subscriptions list.

Event Summary

Properties

_connects

List of all connections.

_subscribes

List of all subscribes.

grid

Grid that the plugin belongs to

name

plugin name

option

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"], ...}

privates

Private properties/methods shouldn't be mixin-ed anytime.

Methods

_getPageInfo()

Find pages that contain visible rows

Returns:Object | object

{topPage: xx, bottomPage: xx, invalidPages: [xx,xx,...]}

_hasIdentity(points)
Parameter Type Description
points undefined
Returns:boolean
changeCells(sourceGrid,cellsToMove,target)
Parameter Type Description
sourceGrid undefined
cellsToMove undefined
target undefined
clearCells(cellsToClear)
Parameter Type Description
cellsToClear undefined
connect(obj,event,method)

Connects specified obj/event to specified method of this object.

Parameter Type Description
obj undefined
event undefined
method undefined
Returns:undefined

Examples

Example 1

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
});
copyCells(cellsToMove,target)
Parameter Type Description
cellsToMove undefined
target undefined
disconnect(handle)

Disconnects handle and removes it from connection list.

Parameter Type Description
handle undefined
init()
insertRows(sourceGrid,rowsToMove,targetPos)
Parameter Type Description
sourceGrid undefined
rowsToMove undefined
targetPos undefined
moveCells(cellsToMove,target)
Parameter Type Description
cellsToMove undefined
target undefined
moveColumns(colsToMove,targetPos)

Move a set of columns to a given position.

Parameter Type Description
colsToMove Integer[]

Array of column indexes.

targetPos Integer

The target position

moveRows(rowsToMove,targetPos)

Move a set of rows to a given position

Parameter Type Description
rowsToMove Integer[]

Array of row indexes.

targetPos Integer

The target position

removeRows(rowsToRemove)
Parameter Type Description
rowsToRemove undefined
setArgs(args)
Parameter Type Description
args undefined
subscribe(topic,method)

Subscribes to the specified topic and calls the specified method of this object.

Parameter Type Description
topic undefined
method undefined
Returns:undefined

Examples

Example 1

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
});
unsubscribe(handle)

Un-subscribes handle and removes it from subscriptions list.

Parameter Type Description
handle undefined

Events

onPostInit()

Examples

Example 1

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
});
onPreInit()

Examples

Example 1

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
});
onSetStore(store)
Parameter Type Description
store undefined

Examples

Example 1

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
});
onStartUp()

Examples

Example 1

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
});
Error in the documentation? Can’t find what you are looking for? Let us know!