Combine it with my Copy&Paste Plugin (https://www.extjs.com/forum/showthread.php?t=64477) and you will have a seamless Integration of an Web-app into the Desktop.

VinylFox

2 Oct 2009, 5:53 AM

@crp_spaeth - I think you might have linked to the wrong post.

How about this: https://www.extjs.com/forum/showthread.php?t=64477

Ill give it a look.

crp_spaeth

2 Oct 2009, 5:59 AM

Wher did that link come from? :) Jeah your right...

hendricd

2 Oct 2009, 7:36 AM

Nice work, guys! =D>

I was playing with the example, and noticed that the mousewheel is ineffective (scrolling the grid). It does work when over the scroller.

Can you somehow pass those events down too?

Animal

2 Oct 2009, 10:27 AM

I'm working on this at home.

Right now, it's just IE that is holding things up. I'll post an update here, and to Shea when I get it working.

aw1zard2

2 Oct 2009, 11:47 AM

Excellent work guys. I have been toying with drag and drop for file uploading on mozilla 3.6 alpha. Using the File API. Anyone know if IE has started any work for file uploading like the other browsers have? I haven't found too much talk about it.

http://dev.w3.org/2006/webapi/FileUpload/publish/FileAPI.html

=D>

Thomas Triplet

5 Oct 2009, 10:46 AM

=D> =D> Woww look great!

Works nicely, but I'm getting an error message (just added plugins: [Ext.ux.grid.DataDrop] in the grid config)

The data does appear in the grid, but the data isn't sent to the server (added newRec.markDirty(); in function dataDropped() before adding to the store. The dirty marks do appear as well, but data is still not sent (getting data to be sent using getModifiedRecords) =/

VinylFox

5 Oct 2009, 12:43 PM

Works nicely, but I'm getting an error message (just added plugins: [Ext.ux.grid.DataDrop] in the grid config)

The data does appear in the grid, but the data isn't sent to the server (added newRec.markDirty(); in function dataDropped() before adding to the store. The dirty marks do appear as well, but data is still not sent (getting data to be sent using getModifiedRecords) =/

The data does appear in the grid, but the data isn't sent to the server (added newRec.markDirty(); in function dataDropped() before adding to the store. The dirty marks do appear as well, but data is still not sent (getting data to be sent using getModifiedRecords) =/

Set it to break on all errors, then see what it's doing there.

genio

27 Jan 2010, 3:38 AM

Hi guys,

I am seeing some strange behavious with the plugin (which is great by the way)

If I combine it with row editor, once I open up the editor I am unable to select another cell and the caret seems to dissapear to the top cornet of the grid.

So to reproduce this is what I am doing

- Double Click on cell to open Editor
- Cell is selected for edit as expected
- Move to different cell in the row and selection/focus does not respond
- I notice a sliglitly visible caret at the top left corner of the grid
- I am now unable to select any cell anymore... :(

Removing the DragDrop plugin will make IE behave as expected with RowEditor

This is only happening in IE, Firfox behaves as expected with BOTH PLUGINS and the ability to move between cells when the RowEdit is opened.

Any clues why this is happening? Is it the big layer in drag drop taht makes IE mess up?

Let me know

Animal

27 Jan 2010, 10:38 PM

I suspect some work will have to be done to hide the masking div on edit start and show it again on edit end.

genio

28 Jan 2010, 2:07 AM

does DragDrop have access to the grid itself to check this? Was wondering how difficult it is to patch... but only IE has this, Firefox behaves...

genio

18 Feb 2010, 2:54 AM

I have noticed a bug with this plugin!

When the textarea is generate on top of the grid, it actually covers and disables the scroll bars...

I have added the size of the scroll bar to the resize function; which fixes it fixes it. ~o)

I am guessing cause t is undefined, where it can't get the window element from the x/y points? But again it's a guess. I am going to do more testing to try and see what's going on. I have only been able to hit a breakpoint twice, every other time I drag into the grid, it forwards to google doing a search with the highlighted excel contents.

<edit> Yes, I tested successfully with a grid rendered to the document body, but when trying to drop on the same grid in a Ext.Window, it doesn't capture the text, it pastes whatever text I am copying into the url bar and does a google search for that text...Weird, because from what I read about document.elementFromPoint on your blog, it should be detecting the window...I will keep looking.

<edit2> I maximized the window, and did a drop, and it worked great! I will try and figure out how it was missing my drop even though I was doing it in the center of the grid. This is the greatest plugin. Impressive work guys.

michael melsen

29 Sep 2010, 1:22 AM

Hi VinylFox,

great plugin! Thanks for it.

I'm trying to embed it in my grid and it works great. However I'm trying to add events to it so I can listen when the data is dropped so I can add a modal window that shows the differences between the original records in the store and the possibly different records from the excel file.

As the plugin is seen as an object that does not extend observable or anything else, I can't listen for events on it. Do you have an idea about how to extend the datadrop plugin in order to be notified when the data is dropped to perform popup a modal window?

kind regards,

Michael

imran

14 Dec 2010, 8:27 AM

Cool plugin!

BTW, when dropping a large number of rows I noticed that each Record was being added, focused upon, then highlighted - becoming uber slow, esp when used with BufferView.

As an improvement, I slightly modified the dataDropped function to add an array of Records to the store, outside the for loop -vs- adding incrementally for each row:

@imran - There is now a setting for addBulk, which does what you suggested.

@michael melsen - I added three events to the grid that the plugin is initialized on, for beforedatadrop, datadrop and afterdatadrop. The beforedatadrop event can return false to cancel the processing of the dropped data.

imran

31 Dec 2010, 10:32 AM

I am not experiencing the same problem as you and genio. Please provide more information, such as what version of ExtJS you are using and a test case.

I am using version 3.3.1 and had seen the issue in IE8 only. It would, however, work after an event (expand/collapse etc.) would trigger a doLayout, but otherwise the scrollBar was not clickable - although visible. I'll look to create a simple example to illustrate this.

@imran - There is now a setting for addBulk, which does what you suggested.

@michael melsen - I added three events to the grid that the plugin is initialized on, for beforedatadrop, datadrop and afterdatadrop. The beforedatadrop event can return false to cancel the processing of the dropped data.

Very cool, I'll give it a go

Thanks!
Imran

imran

3 Feb 2011, 1:33 PM

Hi Shea,

I made some updates to make DataDrop a bit more configurable. I had a requirement where, say I dragged a 2 column spreadsheet onto the grid, but it was to be pasted in my GridPanel's columns 1 and 5.

I added an *optional* dataDropPluginCfg property obj for this, which accepts addBulk, highlightNewRows, and an xlsColMapper:

I've been trying out this plugin on 4.1.3, and I can't get it to work properly.
When trying to drag rows into the grid, I get this message:

I've added the MouseEventForwarding.js override file, but is there something else I ahve to do to get this override registered, or should this happen automatically? (probably a newbie question).

Frank

frank.bolviken

28 Dec 2012, 4:38 AM

Okay, i got the plugin working.
I have another question though... have you considering also the possibilities of pasting? Like if you don't want row 1 to 5, you want row 1,3,5. To achieve this, you have to select the rows, and copy.
So the possibility to paste it in would be cool.

Frank B

Joyfulbob

18 Mar 2013, 9:25 AM

This is a dumb question, and I'll probably go, Duh!" when I read the reply, but how do you get Excel to allow dragging of rows?

When I selected some rows and clicked on one to drag, Excel de-selected the area and selected the row I clicked. CTRL+, SHIFT+, and ALT+ did not work.

Thanks in advance!

frankbolviken

18 Mar 2013, 9:31 AM

This is why I love excel :P
You have to click and hold on the edge of the selection (the dotted line), if you don't hit that one you will loose your selection :P

Frank

Joyfulbob

18 Mar 2013, 9:44 AM

Thanks, Frank!

At least I don't feel quite so dumb! ;)

Joyfulbob

19 Mar 2013, 6:35 AM

I got it working and it is an awesome extension! Thanks!

A question though, if you have a blank Excel cell it doesn't import that blank cell; it moves all cells to the right of the blank one to the blank grid column. Shouldn't it allow blank cells to keep each Excel cell in it's corresponding grid column?