Recent Posts

Pages: 1 [2] 3 4 ... 10
11
Help for ParamQuery Pro / Re: Drag & drop rows without the diDrag icon
« Last post by paramvir on August 01, 2025, 08:15:36 pm »
jQueryUI sortable doesn't work with virtualized DOM so the whole rows need to be rendered in view.

The selectionModel.type needs to be turned off to give the mouse control to sortable.

The following is a quick sample of sortable with pqgrid.

https://jsfiddle.net/us7kmz21/
12
Help for ParamQuery Pro / Re: How do I undo a moveNode event
« Last post by paramvir on August 01, 2025, 02:57:08 pm »
Drag-and-drop operations in a treegrid support undo and redo functionality.

Although undo is not currently available in the plain grid, this capability is being introduced in the upcoming release.
13
Help for ParamQuery Pro / Re: Drag & drop rows without the diDrag icon
« Last post by jplevene on July 31, 2025, 05:49:35 pm »
Sorry, one more thing.  The drag and drop in a normal grid and a tree grid is very different.  The tree you drag and drop the entire row, the grid only a handle icon.

The tree grid is really strange and hard to understand and is not similar to the normal tree that uses a horizontal line. All other trees use a line or an indicator arrow to show if the drop is inside, above, below, or at the parent (the arrows indent).  A really good example is https://preview.keenthemes.com/html/keen/docs/general/jstree/dragdrop.
14
Help for ParamQuery Pro / How do I undo a moveNode event
« Last post by jplevene on July 31, 2025, 03:11:02 pm »
If I drag and drop a node, but saving it on the server has an error, I want to be able to undo/revert the move.  How do I do this?

colModel = {
moveNode: function(event, uiDrop) {
  if(ajax_error)
       undo_this_move(uiDrop);
  }
}
15
Help for ParamQuery Pro / Re: Drag & drop rows without the diDrag icon
« Last post by jplevene on July 31, 2025, 02:57:03 pm »
Should have mentioned, to work how jQueryUI Sortable works, or even use Sortable would be great
18
Help for ParamQuery Pro / Drag & drop rows without the diDrag icon
« Last post by jplevene on July 31, 2025, 01:25:58 am »
Is there a way to drag and drop the entire row without using the drag helper?

I did below but this means there is a drag-handler icon:

Code: [Select]
dragModel: {
on: true,
diDrag: "QTY",
tmplDrag: '<span class="ui-icon ui-icon-grip-dotted-vertical pq-drag-handle" style="cursor:move; vertical-align:text-bottom; touch-action:none; float:left;">&nbsp;</span>',
diHelper: ["QTY", "NAME"]
},
dropModel: {
on: true
},
moveNode: function(e, uiDrop){ console.log(uiDrop); }

I don't want the diDrag drag-handler icon and just want to drag anywhere on the row to initiate the drag (I am already using row selection).  I thought of trapping a mouse down event and after a move of a certain amount of pixels, manually trigger a drag start, but not sure how?
19
Help for ParamQuery Pro / Re: Add an html element in a blank filter column cell.
« Last post by jplevene on July 22, 2025, 07:35:58 pm »
Should have mentioned that I already did this.  Just wondered if there was another way.  Thanks
20
Bug Report / Re: error when cell value is cleared or only spaces are entered
« Last post by paramvir on July 21, 2025, 11:29:31 pm »
Your code is fine, please use this patch before initialization of grids to fix the issue:

Code: [Select]
(function(){
let _p = pq.parseDate;
pq.parseDate = function(fval, ...args) {
if (!fval || typeof fval != 'string' || fval.trim() == ''){
return '';
}
return _p.apply(this, arguments);
}
})();
Pages: 1 [2] 3 4 ... 10