Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Reorder indicator together with drop-move event handler

    Hi,
    What I need is to display some kind of custom indicator while drop-move event, but still have the build-in record reorder indicator active on ListGrid.
    The following example shows that if only any drop-move event handler is added to the grid, then reorder indicator is gone.
    When drop-move handler (doing nothing) is commented out, then dot-red reorder indicator is back again.

    The question is: Is it possible to define custom drop-move event handler together with build-in reorder indicator?

    Code:
    package pl.com.tech4.client;
    
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.user.client.DOM;
    import com.smartgwt.client.data.DataSource;
    import com.smartgwt.client.data.DataSourceField;
    import com.smartgwt.client.data.fields.DataSourceTextField;
    import com.smartgwt.client.util.SC;
    import com.smartgwt.client.widgets.events.DropMoveEvent;
    import com.smartgwt.client.widgets.events.DropMoveHandler;
    import com.smartgwt.client.widgets.grid.ListGrid;
    import com.smartgwt.client.widgets.grid.ListGridRecord;
    
    public class MainEntryPoint implements EntryPoint {
       
        public void onModuleLoad() {
    
            DOM.getElementById("loadingPicture").removeFromParent();
            layout();
            SC.showConsole();
        }
       
        private void layout() {
           
            DataSource ds = new DataSource();
            DataSourceField fieldId = new DataSourceField();
            fieldId.setName("id");
            fieldId.setPrimaryKey(true);
            fieldId.setHidden(true);
            DataSourceTextField fieldCode = new DataSourceTextField();
            fieldCode.setName("code");
            ds.setFields(fieldId, fieldCode);
           
            ListGrid lg = new ListGrid();
            lg.setDataSource(ds);
            ListGridRecord[] records = new ListGridRecord[2];
            records[0] = new ListGridRecord();
            records[0].setAttribute("id", "1");
            records[0].setAttribute("code", "m/s");
            records[1] = new ListGridRecord();
            records[1].setAttribute("id", "2");
            records[1].setAttribute("code", "knots");
            lg.setData(records);
            lg.setCanReorderRecords(true);
           
            lg.addDropMoveHandler(new DropMoveHandler() {
    
                public void onDropMove(DropMoveEvent event) {
                }
            });
    
            lg.draw();
        }
    }
    Thanks,
    MichalG

    SmartClient Version: v10.0p_2014-12-27/LGPL Development Only (built 2014-12-27)
    Firefox 24.8.0 (Gentoo linux)
    Attached Files

    #2
    We have reproduced your issue and are investigating.

    Comment


      #3
      This should be fixed in the nightly builds available tomorrow for SGWT 5.0p+. If there are still issues you may wish to supply a more complete sample with the real DropMoveHandler that you're using.

      Comment


        #4
        I am confirming that this is fixed in SmartClient Version: v10.0p_2015-02-02/LGPL Development Only (built 2015-02-02).
        No other issues with my DropMoveHandler has been found.
        Thank you.
        MichalG

        Comment

        Working...
        X