I can debug the server side code ad see that the method to
retrieve the User object array is called (twice for some reason). I
can see that the getFirstName() and getLastName() method on the
user objects are called, but my grid is not populated with data.
Why would this be?
getUserByDept(1) is the call to the server, but that
particular function doesn't actually return the results because the
command is asynchronous. Instead, you need to use a result handler
to listen for when the callback returns, or do something like:
rfrishbe is right. Calls made to a RPC service (be it
webservice, httpservice or remoteobject) is asynchronous and as
such it either need to use an event handler and update the
dataprovider value with the received results, or bing the
dataprovider to the lastResult property and when the remote object
method is called, the dataprovider will be updated.