How i can do a drag drop between container (grid)?

I am trying to work out a task with Drag and Drop(WPF ,C#)to include in a demo ,i will explain easy showing an example of code in XAML 
<Grid x:Name="LayoutRoot">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid x:Name="container1" Grid.Row="0" >
<Grid Name="grid1" Background="Aqua" Margin="15"></Grid>
</Grid>
<Grid x:Name="container2" Grid.Row="1" >
<Grid Name="grid2" Background="blue" Margin="15"></Grid>
</Grid>
<Grid x:Name="container3" Grid.Row="2" >
<Grid Name="grid3" Background="green" Margin="15"></Grid>
</Grid>
</Grid>
My purpose is when the user drag the
grid1 in the
container2 automatically the grid2 will go to place in the
container1 (basically I want to swap the grids) then this process will be used every time need to drag a grid in a container. with a code that i wrote down i can do a simple drag&drop  i can drag the "grid1"
to the "container2" but cannot send back automatically the grid2 to container1.
Kindly i ask if you have any advise or tips to make successful this task.
Thank you so much for your attention
Cheers!!!
*********EDIT*********                                                                  
                                 Using this code as follow i can do the drag&drop but what really i need is the grid "container "is fix and never move just the
"grid" should move between the "container "                                 
<StackPanel Name="sp" AllowDrop="True" Background="SkyBlue" PreviewMouseLeftButtonDown="sp_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonUp="sp_PreviewMouseLeftButtonUp" PreviewMouseMove="sp_PreviewMouseMove"
DragEnter="sp_DragEnter" Drop="sp_Drop">
<Grid Name="grid1" Background="Aqua" Height="120" Width="500"></Grid>
<Grid Name="grid2" Background="Blue" Height="120" Width="500"></Grid>
<Grid Name="grid3" Background="Red" Height="120" Width="500"></Grid>
</StackPanel>
private bool _isDown;
private bool _isDragging;
private Point _startPoint;
private UIElement _realDragSource;
private UIElement _dummyDragSource = new UIElement();
public MainWindow()
InitializeComponent();
private void sp_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
if (e.Source == this.sp)
else
_isDown = true;
_startPoint = e.GetPosition(this.sp);
private void sp_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
_isDown = false;
_isDragging = false;
_realDragSource.ReleaseMouseCapture();
private void sp_PreviewMouseMove(object sender, MouseEventArgs e)
if (_isDown)
if ((_isDragging == false) && ((Math.Abs(e.GetPosition(this.sp).X - _startPoint.X) > SystemParameters.MinimumHorizontalDragDistance) ||
(Math.Abs(e.GetPosition(this.sp).Y - _startPoint.Y) > SystemParameters.MinimumVerticalDragDistance)))
_isDragging = true;
_realDragSource = e.Source as UIElement;
_realDragSource.CaptureMouse();
DragDrop.DoDragDrop(_dummyDragSource, new DataObject("UIElement", e.Source, true), DragDropEffects.Move);
private void sp_DragEnter(object sender, DragEventArgs e)
if (e.Data.GetDataPresent("UIElement"))
e.Effects = DragDropEffects.Move;
private void sp_Drop(object sender, DragEventArgs e)
if (e.Data.GetDataPresent("UIElement"))
UIElement droptarget = e.Source as UIElement;
int droptargetIndex=-1, i =0;
foreach (UIElement element in this.sp.Children)
if (element.Equals(droptarget))
droptargetIndex = i;
break;
i++;
if (droptargetIndex != -1)
this.sp.Children.Remove(_realDragSource);
this.sp.Children.Insert(droptargetIndex, _realDragSource);
_isDown = false;
_isDragging = false;
_realDragSource.ReleaseMouseCapture();
Thanks :)

Hello Jonny,
Currently I do not have a sample and I have reviewed this post and find another way which seems more reasonable. Have you cosidered use a ListView instead of common grid. It seems we can do what you want with two common grid however we need to hardcoded
all the things.
If we use ListView, for example, you can see this thread:
http://stackoverflow.com/questions/20573063/creating-icon-view-mode-for-listview-wpf
and this thread:
http://stackoverflow.com/questions/9443695/how-do-i-drag-drop-items-in-the-same-listview
We can drag and drop items instead of grid, which will make this programming much easier than hard code to switch your control's location.
Best regards,
Barry
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Dear Barry Wang thank you so much for your kind support ,just open me a way to do it ,you can see in this post https://social.msdn.microsoft.com/Forums/vstudio/en-US/55873851-e86c-4a20-9b00-de3419054ba8/get-stuck-to-dragdrop-in-this-case?forum=wpf .
Wish you a Happy New Year .
Sincerley

Similar Messages

  • Drag&Drop between two windows

    Hi
    I am interested to know if in the latest version of abap webdynpro it is possible to do drag&drop between two windows?
    And if it is possible to have a floating part of a window ( that I can move it around the screen )?
    Thanks
    Nitsan

    Hi
    Thank u Thomas and Chris for your helpful answers!
    Still there is something I want to be sure about, the interaction that can be done between this floating window
    and the opening window.
    Can both window stay active and communicate between them?
    Ill give an example of what I mean:
    Lets say that I have window with few tables from this window I open another window with a list. now I want to dynamically
    move an item from this list to one of the tables in the parent window or move an item from one of the tables to this list.
    Can this scenario be implemented in abap webdynpro?
    Thanks,
    Nitsan

  • Can I just drag/drop files to the TC to back them up ?

    As it appears to be 'just' a hard drive, can I simply drag/drop any files I want to back up immediately, onto the TC and they will copy across ?
    Will this not affect the backup images ?

    Yes. The Time Capsule is indeed just a disk being served across the network with no special purpose. It is not dedicated to Time Machine (though that's probably what most people buy & use it for and it's certainly marketed for that purpose).
    If you were doing Time Machine backups to a local disk (e.g. Firewire or USB connected external drive) then you'd you'd see a folder for your computers backups with loads of folders inside named for the date & time of that backup. Those are all maintained by Time Machine. You can drop a file anywhere else in the drive (don't drop it inside the folders that Time Machine maintains).
    When using either Time Capsule or the newer Airport Extreme Base Station with the GigE & USB port for printer/disk support, Time Machine works just like a local disk except it encrypts the backup in a sparse image file (basically the same thing as 'FileVault') They key to encrypt/decrypt the data in the spare image is kept in your keychain. You can click your Time Capsule in Finder to mount it and you'll see the sparsebundle file(s). Your Time Machine backups are in the sparebundle files. You can drop & drop files anywhere you want on the Time Machine other than inside the sparsebundles (Time Machine manages them... so you shouldn't mess with those manually unless you know what you're doing.)

  • Drag & Drop between 2 ALV

    Hi everyone,
    is it possible to do drag & drop between 2 ALV (Grid/Tree)? Could some one provide me with a example coding please?
    Thanks for your help in advance.

    check this demo program
    BCALV_TEST_GRID_DRAG_DROP
    Raja

  • Can't use drag&drop

    Hello, I'm using MacBook Pro (retina, 15", late 2013, 2,3 GHz Intel core i7) and after using for a while happened smh strange. I can't use drag&drop, so I can't select the object and drag it. What is wrong?

    Hello!
    I wonder, does the issue persist even after a simple restart of OS X?
    If so, please start Disk Utility (it's in your Applications>Utilities folder), click on your harddrive and select [repair disk permissions]

  • How we can get an interactive report  in alv grid display?

    Hi experts
    Plz tell me how we can get an interactive report in alv grid disply pls send me one sample code to understand this
    thanks in advance

    hi,
    check this one
    *& Report  ZALV_FIELD_GRID1
    REPORT  ZALV_FIELD_GRID1
            NO STANDARD PAGE HEADING.
    TABLES MARA.
    type-pools :slis.
    TYPES : BEGIN OF TMARA ,
            MATNR LIKE MARA-MATNR,
            MEINS LIKE MARA-MEINS,
            ERSDA LIKE MARA-ERSDA,
            color(4) type c,
            SEL type c,
            LIGHT TYPE C,
            END OF TMARA.
    TYPES: BEGIN OF TMAKT,
           MATNR LIKE MAKT-MATNR,
           MAKTX LIKE MAKT-MAKTX,
           MAKTG LIKE MAKT-MAKTG,
           SEL TYPE C,
           COLOR(4),
           END OF TMAKT.
    DATA:  ITAB TYPE TMARA OCCURS 0 WITH HEADER LINE,
           ITAB1 TYPE TMAKT OCCURS 0 WITH HEADER LINE,
           wa_fieldcat type slis_fieldcat_alv,
           fieldcat type slis_fieldcat_alv occurs 0,
           i_layout type slis_layout_alv,
           WA_LISTHEADER TYPE SLIS_LISTHEADER,
           i_LISTHEADER TYPE SLIS_LISTHEADER OCCURS 0,
           V_EVENTS TYPE SLIS_T_EVENT ,
           WA_EVENT TYPE SLIS_ALV_EVENT,
           I_TITLE_MARA TYPE LVC_TITLE VALUE 'FIRST LIST DISPLAYED',
           I_TITLE_MAKT TYPE LVC_TITLE VALUE 'SECONDRY LIST DISPLAYED',
           SORT TYPE slis_t_sortinfo_alv WITH HEADER LINE,
           PRINT_CONT type slis_print_alv.
    SELECTION SCREE
    selection-screen  begin of block screen1  with frame title TEXT-001.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN COMMENT /32(35) COMM1.
    SELECTION-SCREEN ULINE /27(35).
    SELECTION-SCREEN SKIP.
    SELECT-OPTIONS MATNR FOR MARA-MATNR.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN ULINE.
    SELECTION-SCREEN COMMENT /30(50) COMM2.
    SELECTION-SCREEN ULINE /27(40).
    SELECTION-SCREEN SKIP.
    SELECT-OPTIONS ERSDA FOR MARA-ERSDA.
    SELECTION-SCREEN SKIP.
    selection-screen  end of block screen1.
        INITIALIZATION
    INITIALIZATION.
      MATNR-low = '23'.
      MATNR-high = '1000'.
      MATNR-option = 'BT'.
      MATNR-sign = 'I'.
      APPEND MATNR.
      ERSDA-low = '20030124'.
      ERSDA-high = '20050302' .
      APPEND ERSDA.
      PERFORM FILLFIELD.
      PERFORM FILLLAYOUT.
      PERFORM build_print_params.
      PERFORM FILL_SORT.
      PERFORM EVENT_CALL.
      PERFORM POPULATE_EVENT.
            SELECTION-SCREEN OUTPUT
    AT SELECTION-SCREEN OUTPUT.
      comm1 ='SELECT MATERIAL NUMBER  RANGE'.
      comm2 ='SELECT MATERIAL CREATION DATE'.
               START-OF-SELECTION
    START-OF-SELECTION.
      PERFORM READDATA.
      PERFORM POPDATA.
    *&      Form  READDATA
          text
    FORM READDATA .
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT  = MATNR-LOW
        IMPORTING
          OUTPUT = MATNR-LOW.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT  = MATNR-HIGH
        IMPORTING
          OUTPUT = MATNR-HIGH.
      SELECT MATNR
             ERSDA
             MEINS
             FROM MARA
             INTO CORRESPONDING FIELDS OF
            TABLE ITAB
            WHERE MATNR IN MATNR AND ERSDA IN ERSDA.
      LOOP AT ITAB.
        data id_color type i VALUE 1.
        data id_colors(2) type c.
        IF ITAB-MATNR < '000000000000000100'.
          ITAB-LIGHT = '1'.
        ELSEIF ITAB-MATNR < '000000000000000150' AND ITAB-MATNR >
       '000000000000000100' .
          ITAB-LIGHT = '2'.
        ELSE.
          ITAB-LIGHT = '3'.
        ENDIF.
        id_color = id_color + 1.
        if id_color > 7.
          id_color = 1.
        endif.
        id_colors = id_color.
        concatenate 'C' id_colors '10' into itab-color.
        modify itab.
        CLEAR ITAB.
      endloop.
    ENDFORM.                    " READDATA
         Form  FILLFIELD
    FORM FILLFIELD .
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-KEY = 'X'.
      WA_FIELDCAT-COL_POS = '1'.
      WA_FIELDCAT-outputlen   = 20.
      WA_FIELDCAT-HOTSPOT = 'X'.
      wa_fieldcat-seltext_m = 'MATERIAL NUMBER'.
    *WA_FIELDCAT-EMPHASIZE = 'C210'.
      APPEND WA_FIELDCAT TO FIELDCAT.
      clear wa_fieldcat.
      WA_FIELDCAT-FIELDNAME = 'MEINS'.
      WA_FIELDCAT-COL_POS = '2'.
    *WA_FIELDCAT-EMPHASIZE = 'C510'.
      WA_FIELDCAT-outputlen   = 10.
      wa_fieldcat-seltext_m = 'UNIT'.
      APPEND WA_FIELDCAT TO FIELDCAT.
      clear wa_fieldcat.
      WA_FIELDCAT-FIELDNAME = 'ERSDA'.
      WA_FIELDCAT-COL_POS = '3'.
      WA_FIELDCAT-outputlen   = 15.
    *WA_FIELDCAT-EDIT_MASK  = 'DD.MM.YYYY'.
    *WA_FIELDCAT-EMPHASIZE = 'C710'.
      wa_fieldcat-seltext_m = 'CREAT DATE'.
      APPEND WA_FIELDCAT TO FIELDCAT.
      clear wa_fieldcat.
    ENDFORM.                    "FILLFIELD
          Setup print parameters
    form build_print_params.
      PRINT_CONT-reserve_lines = '3'.   "Lines reserved for footer
      PRINT_CONT-no_coverpage = 'X'.
    endform.                    " BUILD_PRINT_PARAMS
         Form  POPDATA
    FORM POPDATA .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
         I_CALLBACK_PROGRAM                 =  sy-repid
      I_CALLBACK_PF_STATUS_SET          = ' '
         I_CALLBACK_USER_COMMAND            = 'USER-COMMAND'
         I_CALLBACK_TOP_OF_PAGE             = 'TOPPAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
         I_GRID_TITLE                       = I_TITLE_MARA
      I_GRID_SETTINGS                   =
         IS_LAYOUT                          = I_LAYOUT
         IT_FIELDCAT                        = fieldcat
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
        IT_SORT                           =  SORT[]
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
         IT_EVENTS                          = V_EVENTS
      IT_EVENT_EXIT                     =
       IS_PRINT                          = PRINT_CONT
        TABLES
          T_OUTTAB                          = ITAB
    EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2
    ENDFORM.                    " POPDATA
         Form  TOPPAGE
    FORM TOPPAGE.
      REFRESH I_LISTHEADER.
      DATA: ld_lines type i,
            ld_linesc(10) type c,
            I_DATE(10) TYPE C,
            I_INFO LIKE WA_LISTHEADER-INFO.
      WA_LISTHEADER-TYP = 'H'.
      WA_LISTHEADER-INFO = 'MATERIAL DETAIL'.
      APPEND WA_LISTHEADER TO I_LISTHEADER.
      CLEAR WA_LISTHEADER.
      WA_LISTHEADER-TYP = 'S'.
      WA_LISTHEADER-KEY = 'DATE :'.
      CONCATENATE SY-DATUM+6(2) '.'
                           SY-DATUM+4(2) '.'
                           SY-DATUM(4) INTO I_DATE.
      WA_LISTHEADER-INFO = I_datE.
      APPEND WA_LISTHEADER TO I_LISTHEADER.
      CLEAR WA_LISTHEADER.
      describe table ITAB lines ld_lines.
      ld_linesc = ld_lines.
      concatenate 'TOTAL NUMBER OF RECORD SELECTED: ' ld_linesc
                        into I_INFO separated by space.
      WA_LISTHEADER-TYP  = 'A'.
      WA_LISTHEADER-INFO = I_INFO.
      append WA_LISTHEADER to I_LISTHEADER.
      clear: WA_LISTHEADER , I_INFO.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY = I_LISTHEADER
          I_LOGO             = 'ENJOYSAP_LOGO'.
    ENDFORM.                    "TOPPAGE
         Form  FILLLAYOUT
    FORM FILLLAYOUT .
      i_layout-zebra = 'X'.
      i_layout-info_fieldname = 'COLOR'.
      i_layout-box_fieldname = 'SEL'.
      I_LAYOUT-lights_fieldname = 'LIGHT'.
      I_LAYOUT-EDIT ='X'.
      I_LAYOUT-colwidth_optimize = 'X'.
      I_LAYOUT-window_titlebar = 'EXAMPLE FOR ALV GRID'.
      I_LAYOUT-no_totalline = 'X'.
    ENDFORM.                    "FILLLAYOUT
        Form  FILL_SORT
    FORM FILL_SORT .
      SORT-DOWN = 'X'.
      SORT-SPOS = 1.
      SORT-FIELDNAME = 'MATNR'.
      SORT-tabname = 'MARA'.
      APPEND SORT.
    ENDFORM.                    " FILL_SORT
         Form  EVENT_CALL
    FORM EVENT_CALL .
      DATA: I_EVENT LIKE V_EVENTS.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          I_LIST_TYPE = 0
        IMPORTING
          ET_EVENTS   = V_EVENTS.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " EVENT_CALL
        Form  POPULATE_EVENT
    FORM POPULATE_EVENT .
      READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'USER_COMMAND'.
        MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
        WA_EVENT-NAME.
    READ TABLE V_EVENTS WITH KEY NAME = SLIS_EV_END_OF_PAGE
                                          INTO WA_EVENT.
    IF SY-SUBRC = 0.
       move 'END_OF_PAGE' to WA_EVENT-FORM.
       MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
       WA_EVENT-NAME.
      endif.
      ENDIF.
    ENDFORM.                    "POPULATE_EVENT
    FORM END_OF_PAGE.
      write: sy-uline(50).
      skip.
      write:/40 'Page:', sy-pagno .
    ENDFORM.
    *&      Form  USER_COMMAND
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN '&IC1'.
          CASE RS_SELFIELD-FIELDNAME.
            when 'MATNR'.
              read table itab with key matnr = RS_SELFIELD-VALUE.
              if sy-subrc = 0.
                PERFORM DATA_RETRIEVAL_MAKT USING RS_SELFIELD-VALUE.
                PERFORM BUILD_FIELDCATLOG_MAKT.
                PERFORM FILLLAYOUT_MAKT.
                PERFORM DISPLAY_ALV_MAKT.
                CLEAR RS_SELFIELD.
              ENDIF.
          ENDCASE.
      ENDCASE.
    ENDFORM.                    "user_command
         Form  DATA_RETRIEVAL_MAKT
    FORM DATA_RETRIEVAL_MAKT USING TMATNR .
      SELECT MATNR
             MAKTX
             MAKTG
             UP TO 100 ROWS
             FROM MAKT
             INTO TABLE ITAB1
             WHERE SPRAS = 'EN' AND MATNR = TMATNR.
      LOOP AT ITAB1.
        data id_color type i VALUE 1.
        data id_colors(2) type c.
        id_color = id_color + 1.
        if id_color > 7.
          id_color = 1.
        endif.
        id_colors = id_color.
        concatenate 'C' id_colors '10' into itab1-color.
        modify itab1.
        CLEAR ITAB1.
      ENDLOOP.
    ENDFORM.                    "DATA_RETRIEVAL_MAKT
         Form  FILLLAYOUT_MAKT
    FORM FILLLAYOUT_MAKT .
      CLEAR I_LAYOUT.
      i_layout-zebra = 'X'.
      i_layout-info_fieldname = 'COLOR'.
      i_layout-box_fieldname = 'SEL'.
      I_LAYOUT-EDIT ='X'.
      I_LAYOUT-colwidth_optimize = 'X'.
      I_LAYOUT-window_titlebar = 'EXAMPLE FOR ALV GRID'.
    ENDFORM.                    " LAYOUT_MAKT
        Form  BUILD_FIELDCATLOG_MAKT
    FORM BUILD_FIELDCATLOG_MAKT .
      REFRESH FIELDCAT.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-KEY = 'X'.
      WA_FIELDCAT-COL_POS = '1'.
    *WA_FIELDCAT-EDIT_MASK  = 'DD.MM.YYYY'.
      WA_FIELDCAT-EMPHASIZE = 'C510'.
      wa_fieldcat-seltext_m = 'MATERIAL NUMBER'.
      APPEND WA_FIELDCAT TO FIELDCAT.
      clear wa_fieldcat.
      WA_FIELDCAT-FIELDNAME = 'MAKTX'.
      WA_FIELDCAT-COL_POS = '2'.
      WA_FIELDCAT-EMPHASIZE = 'C710'.
      wa_fieldcat-seltext_m = 'MATERIAL DESCRIPTION'.
      APPEND WA_FIELDCAT TO FIELDCAT.
      clear wa_fieldcat.
      WA_FIELDCAT-FIELDNAME = 'MAKTG'.
      WA_FIELDCAT-COL_POS = '3'.
      WA_FIELDCAT-EMPHASIZE = 'C210'.
      wa_fieldcat-seltext_m = 'MATERIAL DESCRIPTION'.
      APPEND WA_FIELDCAT TO FIELDCAT.
      clear wa_fieldcat.
    ENDFORM.                    " BUILD_FIELDCATLOG_MAKT
         Form  DISPLAY_ALV_MAKT
    FORM TOP-OF-PAGE.
      REFRESH I_LISTHEADER.
      DATA: ld_lines type i,
            ld_linesc(10) type c,
            I_DATE(10) TYPE C,
            I_INFO LIKE WA_LISTHEADER-INFO.
      WA_LISTHEADER-TYP = 'H'.
      WA_LISTHEADER-INFO = 'MATERIAL DESCRIPTION FOR SELECTED NUMBER'.
      APPEND WA_LISTHEADER TO I_LISTHEADER.
      CLEAR WA_LISTHEADER.
      WA_LISTHEADER-TYP = 'S'.
      WA_LISTHEADER-KEY = 'DATE :'.
      CONCATENATE SY-DATUM+6(2) '.'
                           SY-DATUM+4(2) '.'
                           SY-DATUM(4) INTO I_DATE.
      WA_LISTHEADER-INFO = I_datE.
      APPEND WA_LISTHEADER TO I_LISTHEADER.
      CLEAR WA_LISTHEADER.
      describe table ITAB1 lines ld_lines.
      ld_linesc = ld_lines.
      concatenate 'TOTAL NUMBER OF RECORD SELECTED: ' ld_linesc
                        into I_INFO separated by space.
      WA_LISTHEADER-TYP  = 'A'.
      WA_LISTHEADER-INFO = I_INFO.
      append WA_LISTHEADER to I_LISTHEADER.
      clear: WA_LISTHEADER , I_INFO.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY = I_LISTHEADER
          I_LOGO             = 'ENJOYSAP_LOGO'.
      I_END_OF_LIST_GRID       =
      I_ALV_FORM               =
    ENDFORM.                    "TOP-OF-PAGE
    *&      Form  DISPLAY_ALV_MAKT
          text
    FORM DISPLAY_ALV_MAKT .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM     = SY-REPID
          I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'
          I_GRID_TITLE           = I_TITLE_MAKT
          IS_LAYOUT              = I_LAYOUT
          IT_FIELDCAT                       = fieldcat
        TABLES
          T_OUTTAB               = ITAB1
        EXCEPTIONS
          PROGRAM_ERROR          = 1
          OTHERS                 = 2.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " DISPLAY_ALV_MAKT
    Rewards points

  • Strange Problem Drag & Drop Between Lists

    In the following code, drag & drop is set to copy objects, but when more than one instance of an item exists, only the last item (highest data provider index) item can be selected. Any idea why this is happening, and how to correct this?
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
      creationComplete="init();">
      <mx:Script>
        <![CDATA[
          import mx.collections.ArrayCollection;
          [Bindable] private var srcAC:ArrayCollection = new ArrayCollection();
          [Bindable] private var destAC:ArrayCollection = new ArrayCollection();
          private function init():void{
            srcAC = new ArrayCollection(['Fish', 'Meat', 'Chicken']);
            destAC = new ArrayCollection();
          private function displayData():void{
            trace("****************************************");
            trace("menuList dataProvider:");
            for each(var srcItem:Object in srcAC){
              trace("\t" + srcItem.toString());
            trace("----------------------------------------");
            trace("orderList dataProvider:");
            for each(var destItem:Object in destAC){
              trace("\t" + destItem.toString());
        ]]>
      </mx:Script>
      <mx:HBox>
        <mx:VBox>
          <mx:Label text="Today's Menu" fontWeight="bold" fontSize="14"/>
          <mx:List id="menuList" width="200" dataProvider="{srcAC}"
            dragEnabled="true" dropEnabled="true" dragMoveEnabled="false"
            allowMultipleSelection="true" fontSize="14"/>
        </mx:VBox>
        <mx:VBox>
          <mx:Label text="Your Order" fontWeight="bold" fontSize="14"/>
          <mx:List id="orderList" width="200" dataProvider="{destAC}"
            dragEnabled="true" dropEnabled="true" dragMoveEnabled="false"
            allowMultipleSelection="true" fontSize="14"/>
        </mx:VBox>
      </mx:HBox>
      <mx:Button id="b1" label="Reset Order" click="init();"/>
      <mx:Button label="Display Data Providers" click="displayData();"/>
    </mx:Application>

    Hello
    Actually I have also face this problem in one of my appliocation so have done some work arround for that.
    If we use object of ArrayCollection as 'key-value' (like- {label:'Fish'} ) pair than it work fine.
    srcAC = new ArrayCollection([ {label:'Fish'},{label:'Meat'},{label:'Chicken'}]);
    In case of
    srcAC = new ArrayCollection(['Fish', 'Meat', 'Chicken']);
    If we drop same item two times than list is not identify unique item of the list
    and if we use objet like- {label:'Fish'} than every item is unique for list.
    I m not sure this is right or not but it works fine.
    Also we need to set 'labelField' of list as per object.
    With Regards
    Virat Patel

  • Why can't I Drag & Drop a link from my address bar to my Bookmarks Toolbar in 4.0? I have the toolbar activated, but I can't do this. I was able to do it no problem with 3.6.

    Drag & Drop for bookmarking a link from Address bar to Bookmarks Toolbar is not working in 4.0. Was working in 3.6, then I upgraded to 4.0 and everything got screwed up. How can I fix this?

    I ditched 4.0 and went back to 3.6.17 but I can't drag and drop with it either. The Favicom idea didn't work for me either. Once in a great while it will work, but usually that ends up screwing up my bookmarks and everything being re-arranged. How could something so simple and basic NOT WORK anymore?

  • Drag&Drop between applications --- PLEASE HELP!

    Hi,
    I am trying to write two programs that will share the data using the system clipboard. When I start dragging an object in App A, it posts data in two format, one in XML format, the other one is just an URL into the system clipboard. When I drop the data to App B, it should read the system clipboard, and just use the XML format. When I drop the data into MSWord, it should use the URL format.
    I defined two DataFlavors:
    DataFlavor xmlFlavor = new DataFlavor("text/xml", "xml flavor");
    DataFlavor urlFlavor = DataFlavor.stringFlavor;
    Both App A and App B use MyTransferable, a subclass of Transferable.
    But when I drop the data to App B, it always throws UnsupportedFlavorException for "xml flavor".
    Has anyone done similar thing or know how I can achieve what I want to do here?
    Thank you very much for your help!!!
    Page

    You insert the DVD into the mac and restart as usual but while holding down the 'C'' key on the keyboard.
    This will boot the Mac from the DVD, not the installed OS. When you get to a desktop, find the Disk Utility (I can't remember where it is, somewhere in the menu bar menus) and open it. Click on the internal hard disk in the left hand column of the Disk Utilitiy window and choose 'repair disk'.

  • How to move items? Drag & Drop but i couldn't move to extreme right

    Hi All,
    We have one Select List and Button, i want to move both the items to right of the region...,I tried using Drag & Drop but i couldn't move to extreme right..
    What i need to do?
    Pls help me in this regard,
    Thanks,
    Anoo..

    Hi Anoo,
    The layout of items on your page depends on the region template used, and also the attributes of the item e.g. the Horizontal/Vertical Alignment of the Element and Label; the value of ColSpan, RowSpan, etc. By making some small tweaks to your existing region template or item attributes, you can achieve the desired layout. For example, lets say you're working with the "Form Region" HTML region. You can easily modify this template to display the standard cells of the table to the right instead of left, by changing the alignment in the <td> tags, using align="right". This will result in all items being positioned to the right of a region using this template.
    You may find it useful to refer to the following related threads on the Application Express forum, which discuss the same topic:
    Re: Layout form items
    Items positioning
    Re: Create a free form Report
    I hope this helps.
    Regards,
    Hilary

  • How resize the image after drag drop according to container

    Hi,
    I have a image which can be drag drop in different size of containers. After drop i want to resize the image by maintaining the aspect ratio according to the container in which it is going to be drop. I will be very thankful for your help.

    thank you, brother
    i will try it see if it is work
    whatever, i will report the result later

  • How to Rearrange components using Drag Drop functionality

    Hi,
    Is it possible to re-arrange the components inside the form using drag drop functionality in RCF?
    There are 3/4 section headers in my screen, user can re-arrange them.
    But as per the RCF document it says, "Drag Drop functionality allows users to drag the value of one component and drop it on to another". It dosent say any thing about component drag-drop.

    Hi,
    there is a componentDragSource element that you use for this. However, persisting the change of location is not handled automatically. I didn't try this, but I assume that using the component drag option gives you access to the UI component itself so you can nest it in another container
    Frank
    Ps.: the drag event always givey you access to the component. This componentDragSource however shows the component when dragging, which is a slightly better indicator if you plan to re-arrange items

  • Why can IPhone not drag/drop BUT Ipod Touch can???!!!

    Hi all,
    Why can I not drag and drop files within Itunes to my Iphone (synch only)
    Whereas on the inferior IPod touch I can !!1 Huh?????
    SvK
    Message was edited by: Steven von Kampen

    BigT_NYCOM wrote:> Actually, from my understanding, iPods can sync contacts and calendars. At least my old Video iPod has all my contacts and calendar in it.
    Yes they can, you are correct. I should have maybe said that in my post. I was merely trying to say that I believe they want to keep the iPhone more organized. I got out of dragging and dropping to my iPod after I created my first playlist. Makes things a lot eaiser just to sync a list.

  • HT1267 i've got about 2500 songs on my iphone, i have replaced my computer & lost my library-question is why can't i drag/drop new downloaded music to my iphone without 'syncing' & losing my 2500 songs from the iphone?

    I've got about 2500 songs on my iphone, i have recently replaced my computer because the old one crashed, so i lost all the songs in the itunes library. My question is, it seems that now i am unable to drag/drop new downloaded songs without syncing my iphone & losing my 2500 songs from the phone?

    You cannot. Iphone will sync/manually manage music with one and only one computer at a time.  Syncing/manually managing with another will erase the current content from the iphone.
    It has always been very basic to always maintain a backup copy of your computer.  Use your backup copy to put everything back.

  • Can I freely drag & drop clips in iMovie's timeline?

    I'm trying to make a vid of clips playing along with the lyrics of a song. It'd be easier if I could drag the clips wherever I want, but they just get stuck in the position they're dropped in.

    Do you mean that you are trying to get the clips to change in time with the music?  You can drag them around in any order but iMovie will not leave any spaces between them so you have to adjust their durations to get the timing right.
    Geoff.

Maybe you are looking for

  • Multiple Monitors with T440p and Pro Dock

    Hello:  I recently recieved my new business computer from our company offerings.  I got a T440p with the Pro Dock station.  Previously I had something similar that I got two years ago.  On the old system I was able to connect three monitors to the do

  • How to schedule one instance at a time consecutively

    Hi Everyone, We are at BOXIR3.1 SP5 installed in RHEL and business is looking for below mentioned scheduling option for specific webi reports which are complex and having high volume of data. Lets say the scenario is if the users schedules the specif

  • Java files work but jar files do not

    Hello everyone! My java files run normally and I get a response that I expect (which is successful). Imagine my surprise when I collected them in a Jar and the very same files inside the jar no longer work! I get a response (still generated by my jav

  • Failed to execute sql statements

    Hi all, We have a cluster domain on a AIX 4.3 machine with jdk IBM 1.3. Sometimes we get the following error at jdbc log files at one node. When we restart this node( it is always the same) the problem stopped. Has anyone dealt with this problem Vers

  • Userexit asking for access key in CMOD

    Hi Experts, I am trying to write source code for an user exit in CMOD by creating a project and assigning enhancement to it. When i click on user exit and press change it asks for access key . Can you please tell me if there is any other way to write