View Full Version : Filter datagrid
maxy83
03-20-2009, 04:39 PM
Hi, i'm italian and i apologise for my english.
i have a problem. i'm trying to filter a datagrid in flex 3. that datagrid is populated from a php file that create an xml description. It work's fine but i can't filter the data. I have to put the data into an array collection? thank's
MaX
Peter Cowling
03-20-2009, 04:45 PM
Probably best to do something like this (http://blog.flexexamples.com/2007/08/04/filtering-an-xmllistcollection-using-the-filterfunction-property-and-regular-expressions/) if you are more comfortable working with xml based data.
maxy83
03-20-2009, 05:07 PM
the problem is thath i use an httpservice to retrieve the data from a php file.
i have a flex tree, and when i click an item of these tree i send an object to a php file that execute a query to a database and create the xml file. This file populate the datagrid and i would like to filter this data if is possible... thank's
Peter Cowling
03-20-2009, 05:55 PM
Once the xml data is returned from the server query, you can work off the result, to create the xmllistcollection - see here for more on the required approach (http://blog.flexexamples.com/2008/03/29/dynamically-loading-xml-files-using-the-httpservice-tag/).
From that point, you can work on the filterfunction.
maxy83
03-20-2009, 06:09 PM
thank's i will try this... for now i put the httpservice result into an array and now i have to try to filter the data. Probably i have to change this system with the one whit the list. Thank you so much
Peter Cowling
03-20-2009, 07:24 PM
Okay good luck.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.