Structures/Datagrid - sorting on field prior to display with csv data source?

From: Date: Wed, 27 Dec 2006 03:46:42 +0000
Subject: Structures/Datagrid - sorting on field prior to display with csv data source?
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-26208@lists.php.net to get a copy of this message
I'm having a bit of trouble when using a csv file with Structures/Datagrid. Is there a way to "pre-sort" the data on a particular field? My goal is to have the data sorted on the first field/column prior to the first time the grid is displayed. Right now it defaults to displaying the rows in the order they were read. When using a database as a source it looks like you handle this by adding a SORT to your SQL statement. I'm not sure how to accomplish this for a CSV. The docs do show a "primary_key" option, but nothing on how to utilize it. Looking at the Datasource CSV.php and Array.php code doesn't reveal much. I do see a sort function in Array.php but not a clear understanding of how to get CSV.php to use it. Is there an option/method I'm overlooking or do I need to add this functionality to the CSV datasource driver (CSV.php)?? Thanks

« previous php.pear.general (#26208) next »