I’m trying to set an array collection equal to a event.result that contains an array collection, but my array collection keeps coming up null. The event.result isn’t empty because I can assign it as the dataprovider for a datagrid and that works (shows data correctly)
var ac = new ArrayCollection();
ac = event.result as ArrayCollection;
dgSomeDataGrid.dataProvider = event.result;
Any idea on what I’m doing wrong?
The
asoperator will return null if the object is not of the correct type. Whatever event.result is, it isn’t anArrayCollection. Do you know what it is? One way to find out:If it is an
Array, you can create a new collection:More info would be nice.