do {
adjustLeft = false;
adjustTop = false;
adjustBottom = false;
for (int y = extentTY; y <= extentBY; y++) {
WSCell cell = dataGrid.getCell(startSelY + y, startSelX + extentLX);
if (y == extentTY) {
if (cell.getUpwardRowspan() > 1) {
adjustTop = true;
}
}
if (y == extentBY) {
if (cell.getRowspan() > 1) {
adjustBottom = true;
}
}
if (cell.getLeftwareColspan() > 1) {
adjustLeft = true;
}
}
if (adjustTop) {
focusTopEdge();