Results 1 to 5 of 5

Thread: Drag Grid Column to toolbar button

  1. #1

    Default Drag Grid Column to toolbar button

    Hi there,
    3rd day now and no result ...

    Could you please give me a starter how to drag a grid column to a toolbar button. I'd like to export the column to a spreadsheet using POI on the server side.

    Is it possible to drag more than one column?

    Everything works fine with grid rows. But I have no hint how to drag the column outside the grid.

    Thanks a lot
    Dirk

  2. #2
    Ext JS Premium Member dj's Avatar
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    573

    Default

    your dropzone needs the ddgroup "gridHeader" + grid.getGridEl().id.

    Have a look at Ext.grid.HeaderDropZone in src/widgets/grid/ColumnDD.js
    Daniel Jagszent
    [email protected]??gsze?t.de <- convert to plain ASCII to get my email address

  3. #3

    Default works fine but ...

    Hi dj,
    thanks alot for the hint!

    Do you know if it is possible to drag/select more than one column?

    And maybe there is anybody around here who can help me with the style:
    Code:
    var lvDropZone = new Ext.dd.DropTarget(lvRefperField.container, { 
    									   
    		   dropAllowed: 'x-dd-drop-ok', 
                        ddGroup: 'gridHeader' + grid.getGridEl().id, 
    		   notifyDrop: function(dd, e, data) 
    		   { 
    		      alert('drop');
    		   }, 
    		   notifyOver: function(dd, e, data) 
    		   { 
    		      //check if the row is allowed, return true or false 
                           return true;
    		   } 
    		});
    Hides the drop-no.gif but shows not the drop-yes.gif

  4. #4

    Default solved :-)

    Code:
     
    notifyOver: function(dd, e, data) 
    { 
         return this.dropAllowed;
    }

  5. #5
    Sencha User
    Join Date
    Jun 2008
    Location
    ITALY
    Posts
    7

    Default

    Hi all,

    more or less, I'm trying to do the same thing. How can I get/prompt with Ext.Msg.alert the columnID or columnHeader text of the dropped column?

    hope is clear.

    Thanx a lot

    Matteo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •