View Full Version : [FNR] TreeGridDragSource.onDragStart doesn't work correctly with CellSelectionModel

14 Oct 2010, 5:46 AM
on GXT 2.2 and before

if the tree grid selection model is a CellSelectionModel nothing append
because the method treeGrid.getSelectionModel().getSelectedItems() don't return anything

we need to do something like that near line 84

GridSelectionModel<ModelData> sm = treeGrid.getSelectionModel();
List<ModelData> sel;
if (sm instanceof CellSelectionModel<?>)
sel = new ArrayList();
sel.add(((CellSelectionModel) sm).getSelectCell().model);
sel = treeGrid.getSelectionModel().getSelectedItems();

14 Oct 2010, 5:51 AM
This is already fixed in SVN. But you should rethink this approach if it makes sense to use CellSelectionModel to drag a hole row.

14 Oct 2010, 6:05 AM
ok great,
yes for me it make sense because the end-user edit cells and prefer the CellSelectionModel for this