Provide drag and drop for grid columns/rows/cells within grid and out of grid. The store of grid must implement dojo.data.api.Write.
DnD selected columns: Support moving within grid, moving/copying out of grid to a non-grid DnD target.
DnD selected rows: Support moving within grid, moving/copying out of grid to any DnD target.
DnD selected cells (in rectangle shape only): Support moving/copying within grid, moving/copying out of grid to any DnD target.
Parameter | Type | Description |
---|---|---|
grid | undefined | |
args | undefined |
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.
Calculate the position of the cell DnD avatar
Parameter | Type | Description |
---|---|---|
evt | undefined | |
containerPos | undefined | |
targetAnchor | undefined |
Calculate the position of the column DnD avatar
Parameter | Type | Description |
---|---|---|
evt | undefined | |
containerPos | undefined |
Calculate the position of the row DnD avatar
Parameter | Type | Description |
---|---|---|
evt | undefined | |
containerPos | undefined |
Parameter | Type | Description |
---|---|---|
sourcePlugin | undefined |
Parameter | Type | Description |
---|---|---|
evt | undefined | |
isMovingIn | undefined |
Parameter | Type | Description |
---|---|---|
evt | undefined |
Parameter | Type | Description |
---|---|---|
evt | undefined |
Parameter | Type | Description |
---|---|---|
isMovingOut | undefined | |
destroySource | undefined |
Parameter | Type | Description |
---|---|---|
destroySource | undefined |
Parameter | Type | Description |
---|---|---|
rowIndex | undefined | |
colIndex | undefined |
Parameter | Type | Description |
---|---|---|
srcGrid | undefined | |
dndRegion | undefined |
Parameter | Type | Description |
---|---|---|
evt | 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 });
Setter/getter of this._copyOnly.
Parameter | Type | Description |
---|---|---|
isCopyOnly | undefined |
Disconnects handle and removes it from connection list.
Parameter | Type | Description |
---|---|---|
handle | undefined |
Configure which DnD functionalities are needed. Combination of any item from type set ("row", "col", "cell") and any item from mode set("within", "in", "out") is configurable.
"row", "col", "cell" are straightforward, while the other 3 are explained below:
If not provided in the config, will use the default. When declared together, Mode set has higher priority than type set.
Parameter | Type | Description |
---|---|---|
config | Object | DnD configuration object. See the examples below. |
The following code disables row DnD within grid, but still can drag rows out of grid or drag rows from other gird.
setUpConfig({ "row": { "within": false } });
The opposite way is also okay:
setUpConfig({ "within": { "row": false } });
And if you'd like to disable/enable a whole set, here's a shortcut:
setUpConfig({ "cell", true, "out": false });
Because mode has higher priority than type, the following will disable row dnd within grid:
setUpConfig({ "within", { "row": false; }, "row", { "within": true } });
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 |
Parameter | Type | Description |
---|---|---|
evt | 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 });
Parameter | Type | Description |
---|---|---|
sourcePlugin | 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 |
---|---|---|
sourcePlugin | 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 |
---|---|---|
sourcePlugin | undefined | |
isCopy | 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 |
---|---|---|
isMove | 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 });