I have a search button on top of my Datagrid in the application, I have written an event for the search button to retrieve the data from the database and need to populate it in a datagrid. The values will be as ArrayCollection and I provided the same to the dataprovider. I am facing a problem like, when I click a search button, the values are not populated in datagrid, but if I click again, it is getting populated.
I can see the datas from database in a console, when I click the search button for the first time. The only thing is that, it is getting populated only when we click the search button again.
Any solution for this issue?
Thanks in Advance,
1) Is the ArrayCollection bindable ( [Bindable] )?
2) After the data comes in, call myAC.refresh().
If this post answers your question or helps, please mark it as such.
I'm sure there's a solution. You'll probably have to do some debugging. Normally, you use WebService, RemoteObject or HTTPService to get data. The resultHandler updates an ArrayCollection. The ArrayCollection dispatches collectionChange events. The DataGrid is assigned the ArrayCollection or is already watching the ArrayCollection and its collectionChangeHandler method is called and later, updateDisplayList generates itemRenderer instances.
Use the debugger to find out where that sequence is broken.
Flex SDK Developer
Adobe Systems Inc.