Author Topic: Drag column - not working :(  (Read 4317 times)

rgorantla

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 88
    • View Profile
Drag column - not working :(
« on: September 27, 2017, 02:11:30 am »
Hi,

Have a select list in my colmodel and i want that to be draggable - please let me knwo what am i missing  :'(
here is my colmodel:
        {
            title: "Companyname", dataIndx: "Companyname", width: 100, draggable: true,
            editor: {
                type: 'select',
                valueIndx: "value",
                labelIndx: "text",
                options: [],
                mapIndices: { "text": "Companyname", "value": "CompanyId" }
            },
            validations: [{ type: 'minLen', value: 1, msg: "Required" }]
            ,
            filter: { type: 'textbox', condition: 'contain', listeners: ['keyup'] }
        }

Here is my pqgrid obj:
 $("div#grid_showhide_columns").pqGrid({
        width: "100%",
        height: 425,
        dataModel: dataModel,
        copy: false,
 
        fillHandle: 'vertical',
        filterModel: { type: 'local', header: true }, //on: true, mode: "AND",
        pasteModel: { on: false },
        scrollModel: { lastColumn: null },
        colModel: columns,
        editModel: {
            clicksToEdit: 1
        },
        selectionModel: { column: true },
        numberCell: false,
        freezeCols: 1,
        resizable: true     

    });

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Drag column - not working :(
« Reply #1 on: September 27, 2017, 11:38:08 am »
Select lists in column filter are not individually draggable, only the entire columns are draggable.

If the columns are not draggable, please share a jsfiddle (http://jsfiddle.net/0jgmu7vq/ ) as your code looks fine.
« Last Edit: September 27, 2017, 11:39:51 am by paramquery »

rgorantla

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 88
    • View Profile
Re: Drag column - not working :(
« Reply #2 on: September 27, 2017, 06:42:34 pm »
hi,

yes, i was dragging the entire column which has select lists

https://jsfiddle.net/ragorantla/0gq6eg45/ 

Please let me know if it works

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Drag column - not working :(
« Reply #3 on: September 27, 2017, 06:56:10 pm »
Column is draggable in jsfiddle share by you. http://jsfiddle.net/0gq6eg45/1/

So what's the issue?

rgorantla

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 88
    • View Profile
Re: Drag column - not working :(
« Reply #4 on: September 27, 2017, 07:05:04 pm »


ex: enter abc in another column , drag it down values are not in the 2nd row

Sorry may be i was using a different term - it is the fill handle - it is not filling the values

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Drag column - not working :(
« Reply #5 on: September 27, 2017, 10:03:50 pm »
Drag to fill is not working because of pasteModel: { on: false }.

rgorantla

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 88
    • View Profile
Re: Drag column - not working :(
« Reply #6 on: September 27, 2017, 10:43:34 pm »
Thank you :) it worked...

I did not want copy paste allowed in the grid - but all other fields are non-editable so i think it should be fine. Correct?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Drag column - not working :(
« Reply #7 on: September 28, 2017, 11:32:28 am »
data can be copied from editable as well as non-editable cells, but paste works only on editable cells.

rgorantla

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 88
    • View Profile
Re: Drag column - not working :(
« Reply #8 on: September 29, 2017, 02:21:13 am »
yes thanks for the confirmation .