ParamQuery grid support forum

General Category => Bug Report => Topic started by: Autoflow on June 07, 2019, 07:32:59 pm

Title: Setting dropModel by option fails
Post by: Autoflow on June 07, 2019, 07:32:59 pm
Hi, just modified your example "Drag n Drop -> between grids" like this:

        //2nd grid
        $("#dndgrid2").pqGrid({
            height: 500,     
            width: '45%',     
            colModel: $.extend(true, [], columns),
            dataModel: $.extend(true, {}, dataModel),
            complete: function () {
                this.flex();
            },
            dragModel:{
                on: true,
                clsDnD: 'dnd2',
                diHelper:['OrderID']
            },


            //dropModel:{
           //     on: true,
           //     accept: '.dnd1'               
           // },

            //pageModel: { type: 'local', rPP: 20, rPPOptions: [1, 10, 20, 30, 40, 50, 100] },                                   
            title: "Shipping Orders"           
        });
      
   $("#dndgrid2").pqGrid( "option", "dropModel", {
                on: true,
                accept: '.dnd1'               
            } );

Setting dropModel via option fails in this case.
Is this issue a bug?
Title: Re: Setting dropModel by option fails
Post by: paramvir on June 07, 2019, 10:10:32 pm
Setting dropModel after initialization is not supported.
Title: Re: Setting dropModel by option fails
Post by: Autoflow on June 08, 2019, 12:55:24 am
Damn, OK.

I bought a PRO license today.
Is there any way to get this feature running, ie. by taking Tech support credits?
(If it is technically not possible just tell me too)

Best regards.
Title: Re: Setting dropModel by option fails
Post by: paramvir on June 10, 2019, 07:38:33 pm
It's technically possible but it adds bit complexity and bloat to the source code for rarely required feature.

You could do it by destroying and recreating the grid with addition of dropModel. Please let me whether it works for you.
Title: Re: Setting dropModel by option fails
Post by: Autoflow on June 14, 2019, 03:45:11 pm
I adapted my workflow to a select/paste based approach. Fits very well :-)

Allow me  a node beside:
DnD has issues when dropping rows within a nested grid (detailModel).
Dropped rows are then added to parent grid too.
Title: Re: Setting dropModel by option fails
Post by: paramvir on June 14, 2019, 04:45:07 pm
Could you please share a jsfiddle / plnkr for the mentioned DnD issue in a nested grid so that I can check it.