I have a ListGrid that uses a given DataSource with an attached ResultSet. The details for the selected record from the ListGrid are presented within a separate panel. I need to detect the changes and adjust the details panel but only if the selected record has changed. If other records changed I do not need to do anything:
The question is how do I get the changed record to compare it with the selected record from the grid?
Thank you,
Tiberiu
Code:
ResultSet template = new ResultSet();
template.setDataSource(AssignmentDataSource.getInstance());
template.addDataChangedHandler(new DataChangedHandler() {
@Override
public void onDataChanged(DataChangedEvent event) {
if (assignmentsGrid.getSelectedRecord() == null) {
// TODO disable details panel
} else {
// TODO test if the changed record is the selected record
}
}
});
assignmentsGrid = new MyAssignmentsGrid();
assignmentsGrid.setDataProperties(template);
Thank you,
Tiberiu
Comment