Hi, I noticed that fetching data on a ListGrid's SelectionChangedHandler prevents RecordDoubleClickHandler notification when the user double clicks a record and changes the selection.
Is there a way to achieve both notifications, provided that selection changes cause some data fetch?
Here you are a fast snippet written in one go to illustrate the issue
Using SmartClient Version: SC_SNAPSHOT-2010-12-31/LGPL Development Only (built 2010-12-31)
Is there a way to achieve both notifications, provided that selection changes cause some data fetch?
Here you are a fast snippet written in one go to illustrate the issue
Code:
grid.addRecordDoubleClickHandler (new RecordDoubleClickHandler() { @Override public void onRecordDoubleClick (RecordDoubleClickEvent event) { //ISSUE HERE: not triggered on double-click with selectionchange } }); grid.addSelectionChangedHandler (new SelectionChangedHandler () { @Override public void onSelectionChanged (final SelectionEvent event) { final ListGridRecord[] records = grid.getSelection (); relatedGrid.fetchRelatedData (records[0], gridDataSource); relatedForm.fetchData (new Criteria ("id", records[0].getAttribute ("id"))); } });
Comment