ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: JSPetit on September 19, 2018, 08:22:02 pm
-
Hi,
Do you have a sample of the usage of the Draggable option?
What I'm trying to do is to enable dragging rows from one grid to another area, say a div, and perform some operations.
The user would select a few rows and start dragging them.
Right now the draggable option doesn't seem to do much.
If it's not supported, what can I do to enable this, thru custom code or prototype override?
Here is a sample of my grid initialization:
var obj = {
scrollModel: { autoFit: true },
datatype: "json",
showTop: false,
numberCell: { show: false },
selectionModel: { type: 'row', fireSelectChange: true },
dataModel: {
data: []
},
refresh: _refreshSearchGrid,
colModel: cols,
hoverMode: 'row',
selectChange: _searchGridSelectionChange,
draggable: true
};
_self.SearchGridSelector = "[id='" + context + "'] div[controlname='" + grid.GridName + "']"
_self.SearchGrid = $(_self.SearchGridSelector).pqGrid(obj);
Thanks for your help.
-
That draggable option simply makes the whole grid draggable, it doesn't affect the rows.
Drag n drop of rows is under development and would be available in upcoming versions, I would keep your use case in consideration, ability to and drag selected rows and drop them anywhere.
-
What did you end up doing for the drag and drop?
Hi,
Do you have a sample of the usage of the Draggable option?
What I'm trying to do is to enable dragging rows from one grid to another area, say a div, and perform some operations.
The user would select a few rows and start dragging them.
Right now the draggable option doesn't seem to do much.
If it's not supported, what can I do to enable this, thru custom code or prototype override?
Here is a sample of my grid initialization:
var obj = {
scrollModel: { autoFit: true },
datatype: "json",
showTop: false,
numberCell: { show: false },
selectionModel: { type: 'row', fireSelectChange: true },
dataModel: {
data: []
},
refresh: _refreshSearchGrid,
colModel: cols,
hoverMode: 'row',
selectChange: _searchGridSelectionChange,
draggable: true
};
_self.SearchGridSelector = "[id='" + context + "'] div[controlname='" + grid.GridName + "']"
_self.SearchGrid = $(_self.SearchGridSelector).pqGrid(obj);
Thanks for your help.