Send a click event

Hi,
Is there a programatic way to send a click event to a grid? For ex: In the Pattern ReuseSample, to automatically send a click to the first row of the grid when the form is displayed?

           grid.fetchData
  	   grid.selectRecord(1);
          form.editRecord(grid.getRecord(1));

does not work. Because I guess the data is still not there. Defined a callback. I was not able to convert response.getData() into ListGridRecord.
ListGridRecord records = (ListGridRecord)response.getData(); results in an exception.

Thanks for your suggestions.

With Best Regards
Ganesh

Use the DataArrived event to find out when data has been loaded.

Send Click

Thanks, it works…

With Best Regards
Ganesh