while adding row into list grid I couldn't see extended row height to be scrollable , after adding the record I could see the record but while adding the record vertical scrollbar is not coming down automatically instead of that it is scrolling upwards.
I am calling scrollToRow(totalRow-1) in DataArrived Handler. But the scrollbar is not coming down. User need to scroll down manually. This is the code I am using to scroll down
donationGrid.addDataArrivedHandler(new DataArrivedHandler() {
@Override
public void onDataArrived(final DataArrivedEvent event) {
updateHeadingValues();
final int totalRows = donationGrid.getTotalRows();
if (isCashierMode && !isAllocateMode) {
setDefaults(totalRows);
donationGrid.startEditing(totalRows, donationGrid.getFieldNum(DonationDS.DONATIONTYPE), false);
} else {
if (totalRows > 0) {
donationGrid.selectRecord(totalRows-1);
donationGrid.scrollToRow(totalRows-1);
} else {
donationMediator.focusAddDonationButton();
}
}
}
});
I am calling scrollToRow(totalRow-1) in DataArrived Handler. But the scrollbar is not coming down. User need to scroll down manually. This is the code I am using to scroll down
donationGrid.addDataArrivedHandler(new DataArrivedHandler() {
@Override
public void onDataArrived(final DataArrivedEvent event) {
updateHeadingValues();
final int totalRows = donationGrid.getTotalRows();
if (isCashierMode && !isAllocateMode) {
setDefaults(totalRows);
donationGrid.startEditing(totalRows, donationGrid.getFieldNum(DonationDS.DONATIONTYPE), false);
} else {
if (totalRows > 0) {
donationGrid.selectRecord(totalRows-1);
donationGrid.scrollToRow(totalRows-1);
} else {
donationMediator.focusAddDonationButton();
}
}
}
});
Comment