Hi,
I want to display large number of items in DataGrid (>
30,000). Each items could take some time to retrieve all
information for displaying. So I want to do lazy call to server
only when particular row is in view. I'm currently using
RemoteObject to communicate with server side with single result
event handler to get information of each row. Here is the code
snippet :
quote:
pubic class MyService {
private var ro:RemoteObject;
public function init() {
ro = new RemoteObject("myDestination")
ro.addEventListener('getItem').addEventListener(ResultEvent.RESULT,
resultHandler);
}
private function resultHandler(event:ResultEvent) {
// get object from event.result
}
}
In my understanding, the call to remote object is
asynchronous so it can't wait until result is returned to proceed
the next row. That means I need to have this instance of my class
for EACH row in DataGrid ? Is there any better way to this. I worry
about memory footprint of my application if I do so.