This content has been marked as final.
Show 2 replies
-
1. Re: DataGrid fails when only one record is retrieved from Web Service (token.count?)
Michelle5002 Jul 4, 2014 12:56 PM (in response to Michelle5002)Okay, I think I have an answer. Not sure if this is the best way to do this which is why I will leave this unanswered for a bit. If you do have a better way, please respond.
Instead of asking how many records are returned, I checked to see which kind of class was returned. And then depending on the class, I responded. Its a shame the developers of Flex datagrid never thought about what would happen when only one record is returned. Or, its too bad that the web service does not return a list of one record when we told it to send a list.
protected function getPlacesResult_resultHandler(event:ResultEvent):void { placesList = new ArrayCollection(); if (event.result != null) { if (event.result is ArrayCollection) { placesList = getPlacesResult.lastResult; } else { placesList.addItem(event.result); } } } -
2. Re: DataGrid fails when only one record is retrieved from Web Service (token.count?)
pauland Jul 4, 2014 2:01 PM (in response to Michelle5002)That looks OK.
Does it do the trick?

