ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: WynApse on November 15, 2019, 05:39:33 am

Title: Question about dropping into a grouped grid
Post by: WynApse on November 15, 2019, 05:39:33 am
I have requirements to drop onto a grid that has grouping turned on.

I have an ID field on the JSON data that feeds the grid, and when I drop, it matters which column(cell) I drop on.

To add to that fun, I further have a requirement to modify the JSON data.

The problem then becomes that not all the 'uiDrop.rowData' has the id column when things are grouped, so I can't sync my drop info with the JSON because I have no idea what record I'm dealing with.

If I try to turn off the grouping inside 'drop' -- uiDrop is already set and that ship sailed.

I can remove the grouping by hand and everything works because now I DO have the id field.

It would be very nice to have a 'dragbegin' event so that I could remove the grouping and a 'dragend' I suppose in case the user bails on the dnd so I can put the grouping back.

Any ideas around this?

Title: Re: Question about dropping into a grouped grid
Post by: paramvir on November 15, 2019, 09:39:36 pm
jQueryUI draggable API ( and hence drag start and stop events ) can be used for the grid with help of options sub-option of dragModel.

https://paramquery.com/pro/api#option-dragModel

https://api.jqueryui.com/draggable/#event-start

https://api.jqueryui.com/draggable/#event-stop

Code: [Select]
dragModel:{
                on: true,
                .......
options:{
start: function(evt, ui){

},
stop: function(evt, ui){

}                         
}
},