Are you using RemoteObject in order to fetch data from your Server...?? You say that the first time you are getting the data and is showing up correctly in ComboBox. But the second time is throwing an error.
If you are using RemoteObject then have you specified the [RemoteClass(alias="your_serverside_class")] on the AS class..??
Thank you so much for your reply..
Yes iam using the RemoteObject inorder to get data from server..
This is my AS class:::
public class CustomerList
public var arryCollCustName:ArrayCollection = new ArrayCollection();
public var arryCollCustId:ArrayCollection = new ArrayCollection();
This sometimes as in your case might not work as the way you have specified the RemoteClass attribute in your AS class. As somtimes there may be a case as before it is mapped to a server side you are returned the data and so that you may not get the data as your Custom class but as normal Object type.
So in order to avoid this you can map the server side class to AS classes in the PreInitialize handler itself as shown below:
Specify the preinitializeHandler in your main application and write the below function.This way also you can map AS classes with the server side. So that you will not have any problem referring your application as AS class types.
You can use the same line for registering all the classes. By using this you can remove all the [RemoteClass] attributes on all AS classes and include it at single place.
private function onPreinitialize():void
Here in the above line of code the string in quotes refer to the namespace of the Server side class and the latter is your AS class. Also dont forget to import the namespace of the corresponding AS class in the file.
Try this and let me know..
Thanks alot for you reply and the information u have given..
Its working fine now after putting the changes which u have mentioned below..
Thank you so much..