1. #1
    Ext User
    Join Date
    Jan 2008
    Posts
    32
    Vote Rating
    0
    pjesus is on a distinguished road

      0  

    Default Drop into GridRow, not into de GridPanel

    Drop into GridRow, not into de GridPanel


    Hi community.

    I'm trying some drag an drop experiences, and I was wondering if is possible to make a row in a grid or editor grid as a drop target.

    Lets see some code:

    My DragSource
    Code:
    final ContentPanel cp = new ContentPanel();  
    		cp.setCollapsible(true);
    		cp.setHeading("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae tellus vitae quam accumsan congue. Quisque quis mauris.".substring(0, 15) + "...");  
    		cp.addText("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae tellus vitae quam accumsan congue. Quisque quis mauris.");  
    		cp.setWidth(200);
    		cp.setScrollMode(Scroll.AUTO);
    		cp.setIconStyle("icon-pdf");
    		cp.setBodyStyleName("warn-window");
    		
    		new Resizable(cp);								
    
    		DragSource source = new DragSource(cp) {  
    			@Override  
    			protected void onDragStart(DNDEvent event) {  
    				event.data = cp;
    				event.status.update("Drag Name: BLAH BLAH BLAH<br/> Drag Description: BLAH BLAH BLAH");
    				Log.debug("pumba");
    			}  
    		};
    		source.setGroup("test");
    My DropTarget
    Code:
    EditorGrid<BeanModel> grid = new EditorGrid<BeanModel>(store, getColumnModel());  
    		grid.setAutoExpandColumn("text");  
    		grid.setBorders(true);
    		grid.setLoadMask(true);
    		grid.getView().setForceFit(false);
    		grid.setTrackMouseOver(true);
    		
    		GridDropTarget target2 = new GridDropTarget(grid){
    			
    			protected void onDragDrop(DNDEvent e) {				
    				super.onDragDrop(e);
    				Log.debug("allright");
    			}
    		};
    		target2.setAllowSelfAsSource(false);
    		target2.setGroup("test");
    The GridDropTarget only makes the grid panel "dropable" and implements the feedback actions "automatically", am I right?

    I have three questions.

    First, in the drop event can I know if the drop was made over a ROW?
    Second, can i make a ROW as drop target?
    Third, can i make a CELL as drop target?

    If any of my questions as no answer I think this is a good "add on" to GXT.

    Sorry my English

    Regards

    Paulo Jesus

  2. #2
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    3
    gslender is on a distinguished road

      0  

    Default


    Have a look at the source of GridDropTarget, and in particular showFeedback(DNDEvent event)

  3. #3
    Ext User
    Join Date
    Jan 2008
    Posts
    32
    Vote Rating
    0
    pjesus is on a distinguished road

      0  

    Default Nice

    Nice


    Hi @gslender

    That's exactly what I was looking for.

    Thank You.

    I will post some code after try the drop into ROW.

    Congrats for all the good work

    Paulo Jesus

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi