Re: Structures_DataGrid: Columns for fields missing in first record?

From: Date: Wed, 05 Jul 2006 13:40:59 +0000
Subject: Re: Structures_DataGrid: Columns for fields missing in first record?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24563@lists.php.net to get a copy of this message
Markus Ernst wrote: > I encountered that if the records of the datasource do not have a unique > set of fields, the columns are only taken from the first record: You're right. If you don't specify any column, we look into the first record to auto-detect the columns -- this was done for effiency reasons. The best solution would be to use addColumn() which also allows to give more meaningful column headers than just the array keys. > I did not find an option to change this behaviour; now I wonder if I > missed something, or if this should be subject to a feature request, or > if this kind of source structure is just not considered to be appropriate. It is appropriate, but looping through all records can be too expensive for large recordsets (just think of a not paged CSV output with 1 million records ...). Regards, Mark

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