Announcement

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

    Drag and Drop between ListGrid with dataSource-bound ListGrids

    It appears the drag and drop functionality from ListGrid to ListGrid does not work when want to move the record and we use dataSource-bound ListGrids. It does not move the records only copies them.


    We are able to move the records by creating a custom method to load the data and then setting the data into the grids using the setData method (A colleague succeeded at this in a different screen). The problem we have with this approach is that the filter functionality in the grid stops working when we do not use the setDataSource method (http://forums.smartclient.com/forum/...-not-filtering).


    SmartGWT Version:
    <groupId>com.smartgwt</groupId>
    <artifactId>smartgwtee</artifactId>
    <version>5.1p_2016-01-14</version>



    Grid Creation:

    grid.setSize("300px", "400px");
    grid.setAutoFetchData(false);
    grid.setCanDragRecordsOut(true);
    grid.setCanAcceptDroppedRecords(true);
    grid.setCanReorderRecords(true);
    grid.setDragDataAction(DragDataAction.MOVE);
    grid.setShowFilterEditor(true);
    grid.setAllowFilterExpressions(true);
    grid.setDataSource();


    DataSource ds = DataSource.get(TMGE_DS);

    grid.setDataSource(dataSource);

    grid.fetchData(criteria);



    DataSource:

    <fields>
    <field name="eName" title="Name" type="text" required="true" align="center" primaryKey="true"/>
    </fields>

    <sortBy columns="eName"/>

    <operationBindings>
    <binding operationType="fetch" serverMethod="executeFetchTMGE">
    <serverObject className="com.pci.gp.server.TMGDS" lookStyle="new" />
    </binding>
    <binding operationType="update" serverMethod="executeUpdateTMlGE">
    <serverObject className="com.pci.gp.server.TMlGDS" lookStyle="new" />
    </binding>
    </operationBindings>


    #2
    This is too vague to answer..

    Are both grids databound?

    Do they have the same DataSource? In this case "move" causes the Records to be modified to conform to the target grid's criteria. If you wanted something else, please explain.

    If different DataSources, what did you expect "move" to do?

    Comment

    Working...
    X