gald
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);
}
else
{
sel = treeGrid.getSelectionModel().getSelectedItems();
}
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);
}
else
{
sel = treeGrid.getSelectionModel().getSelectedItems();
}