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>
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>
Comment