Flex :: Prevent Datagrid From Editing After A Drag & Drop
Feb 23, 2012
I have an AdvancedDataGrid with editable parameter to "true". My problem is that after a successfull drag & drop, the item is being edited and I don't want this to happen. I tried to create a custom advancedDataGrid with this:
I was wondering, if I have two list boxes, and I want to drag and drop between both of them, how do I prevent the user from dragging onto the same list (thus duplicating the item? I cannot have a situation where that is the case
how would you prevent dragging for some items of your List or DataGrid?
Let's say I had a list with two items: 'Tom' and 'Jerry'. Only 'Tom' should be dragable, not 'Jerry'.
Ideally I had a 'isDragEnabled(item:Object):Boolean' function, which is being queried by the drag source.
My difficulties start with the fact that the 'dragStart' event handler has a null value for the dragSource, so right from the start I find it hard to find out what the drag-start is about..
PS There have been a few discussions on preventing or canceling a drop, but I haven't seen much about preventing the drag start, hence this question.
I'm trying to drag an item from a datagrid and drop it onto a UIComponet. Basically I just want the UIComponent to know that something has been dropped onto it and allow it to access the data of the dropped item.
I thought just listening for the drop event would do it but it seems not.
I found lots of documentation on dragging from one IList to another but nothing for this.
When I enter with a dragged item into datagrid, a bold line appears over the active row of the datagrid (which is fine to show the active row), but the problem is that even after I drop the item into datagrid, that line remains there. It goes only if I enter with a new item (in which case a new line comes to the respective row again).
I am using custom handler for dragdrop event for this datagrid.
I have two datagrid components and I would like to drag one column from one component to the other. I have been trying several methods but I couldnt acomplish that.
I'm doing the drag an drop of an ItemRenderer manually (DataGrid) and want to know how to generate a custom DragProxy of a component that hasn't been added to the display list.
I tried something like this but didn't work:
private function doDrag(event:MouseEvent):void { var dragSource:DragSource = new DragSource();
[Code].....
So, I want to be able to create the DragProxy using a component, the button is just an example.
I'm using drag and drop on a DataGrid to reorder items. However, when the user holds down Ctrl he can initiate a drag Copy operation. How can I disable copying altogether? (not just cancel the drop, but also prevent Ctrl + drag from showing the (+) icon)
1. i am trying to drag and drop movie clips with a short video clips in it(inside movie cilp), on to another square target "tv" with buttons play stop etc.
2. on this square "tv" i want to be able to view the clip i just drag to the "tv" to (manipulate the clip with play stop on so on) and the same thing with the other clips
3. after that i want to drag the movie clips or another movie clip of the same to a time line with other movie clips and be able to play the time line with the editing movie clips as a new entire editable video clip
I have a DataGrid that contains data linked to a server. When I select mutliple items from the grid (using shift-select) and drag some items out from the DataGrid to another component, the array of items being dragged over appears to be in a completely arbitrary sort-order, and are not in the sort -order f the DataGrid as I'd expect.
Therefore, wwhen i drop them on the target (which is unsorted), their order doesnt match that of the DataGrid... what am I doing wrong and how can i fix this?
I'm getting the array using:
var dragItems:Array = event.dragSource.dataForFormat("items") as Array;
Is this the wrong data source on dragSource to look at?
I should mention that the drop target is a nonlist control, and that i am using a custom drop handler...
I have an edit button at the end of each row, when clicked it brings up an editable form with that rows information in it. I am using event listeners to pass the information back to the main datagrid. The only think i don't understand is, how do you update the datafield values in the datagrid.I've tried a lot of different things, variations myDatagrid.nameField.text = "Person's Name"nameField[1].text = "Person's name"Anybody know how I can target the specific rows of the datagrid to edit the values in them?I have looked a little into data binding, but I can't figure out how to bind the form (in a seperate class) to the datagrid in the main mxml file.
How can I get back the focus to the column after editing datagrid by Keypress.Enter, so that I can move to another column using arrow keys. Now its stuck in the edited cell and I cant move to another column.
I am using the flex datagrid to allow the user to edit some data. My update process relies on a CollectionEvent of type update. Basically I catch this event package the values and update the database. However, if the user edits a cell then moves to edit a cell in the same row the value is updated but a collection event is not fired. Only when clicking out of the row the event is fired. Has anyone had experience with this. I have heard the datagrid is a little quirky is this one of those quirks or am I doing this all wrong?
How do I prevent a user from dropping an item outsider a folder? My dataProvider is only 1-level deep.It seems that with a DragEvent handler or DragDrop handler I can find the data of the item I'm dragging, but not where I'm dropping ( so I can prevent it ).
I have some DataGrid with editable rows, which has also an option to add new row 'dynamically'. I mean, last row has some default data (e.g. "CLICK HERE TO ADD NEW ROW") and when user clicks on it, he can edit that value and new row will be eventually inserted.
However, I also have a column in same DataGrid which doesn't come from DataGrid's DataProvider. That column is used to delete specific row and it should only display clickable image with associated mouse click action (within custom itemRenderer).
To situate things I am working on a translation utility with a datagrid having 3 columns : translation code, reference text and target text.
The DataGrid's dataProvider property is bound to an ArrayCollection instance. The user can edit the grid and on a successful edit, the underlying collection is updated using the setItemAt() method. The collection also has a filter function to make it easier to find certain texts.
When the user clicks the 'apply filter' button the filter function is updated. This works well. The problem I have is that rows are hidden as soon as the underlying collection item change in a way that doesn't comply with the filter. The row is hidden immediately, which is not very user friendly. Rows should only hide (or be shown) when the 'apply filter' button is pressed.
So there's been a new "feature" in the flash player since version 10.1, which reduces the player's framerate to 2 fps when the application window is out of view. This is good news for performance, but it can break some functionality, such as the Timer class.
I have an application which uses a Timer to display a countdown. Given the nature of the application, it is required for the Timer to complete its countdown even if the user is not there to see it. Imagine that you need to give the user only 10 seconds to perform a task. If the user minimizes the window halfway through the counter, they can take as much time as they want and still have 5 seconds left when they return to the window. This apparently can not be avoided with the newer flash players.
In Air applications there is the backgroundFrameRate property which can be set to prevent this behavior, but this is part of the WindowedApplication class, so it seems that it is not available in a web application. Does anyone know a way to keep a constant frame rate even when the window is not visible?
I wish while i am draging and moving arround TitleWindow instance and a specific event occure to simulate drop of the window, and not further moving been possible for a few seconds.It is very unusual question but it will be more than handy each point to a solutionP.S: The whole idea is as follow : When i am draging a TitleWindo instace with the mouse, and if the TitleWindow hit the border of it's parent container then to drop the TitleWindow, and not further moving is possible (simulating release mouse button). If i wish to move it again, then i should click the TitleWindow title again and grag it.
i have two tree one tree lets say TreeDrag is drag enabled and other is drop enabled lets say TreeDrop.. when i drag item from TreeDrag to TreeDrop,, i want to show feedback and everything else normal except the addition of dragged item in TreeDrop..
I am trying to do a flex drag and drop. It is very similar to this first example.url....The problem is that event.currentTarget.mouseX,mouseY is showing the position where I put the mouse down rather than the position where I had finished dragging.
we want to drag a button with a css layout from one grid to the other. On the second grid should be the same button with this layout. The grids are in different mxml files.
I'm doing an application in flex where I draw different sprites inside a canvas. Depending of the dimensions, scrollbars can be appear. I would like to move the "image" with the movement of the mouse as you can see at the Adobe Reader when you are reading a document with zoom (hand mouse icon). In this way, you dont have to touch the scrollbar.I'm start trying with drag and drop properties of the canvas, setting the position of the scrollbar according with the movement of the mouse but that is not as I expect.
I am dragging item from a datagrid and while dragging I could see all of the columns in the selected record, being getting dragged. However I only want to show one column (maybe name or id of the record)? Is there a way to achieve this? Also, could I show an icon or image instead of the record while dragging.
I am building a flex project involving drag+drop of fxg graphics. My graphic is instantiated as below: <graphics:arrow2 id="object" mouseMove="mouseMoveHandler(event);" /> I get an error: "Call to a possibly undefined method Graphic."
This works if I change my drag-object to Image and replace the 'Graphic' below with 'Image'. What should I use to be able to reference the fxg graphic in the drag-drop? My drag drop functionality is as follows private function mouseMoveHandler(event:MouseEvent):void { var dragInitiator:Graphic = Graphic(event.currentTarget); var ds:DragSource = new DragSource(); ds.addData(dragInitiator,"gph"); DragManager.doDrag(dragInitiator, ds, event); [Code] .....