If you look at the datagrid source, there is a function called
generateColumns which tries to introspect the data and generate the
column set.  Naturally, nested fields aren't found, and unless the
fields have friendly names, your column headers end up looking like
"lastname" instead of "Last Name", so this is generally not desirable.
Seems like others actually do a fetch to get the column info from the
server that matches the data and has friendly names, then they generate
datagridcolumns on the fly from that data.

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markgoldin_2000
Sent: Monday, January 21, 2008 5:24 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Get fields from dataProvider

 

Yes, that could have been the source of that but in a generic 
situation not all data fields are shown in grids and grids in turn 
might have no data columns (images for example). So, the best is to 
get a list of fields straight from the dataProvider.

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, Tom Chiverton <[EMAIL PROTECTED]> 
wrote:
>
> On Sunday 20 Jan 2008, markgoldin_2000 wrote:
> > But the list of columnName(s) is what I am trying to get.
> 
> As an alternative, look at dataGrid.columns
> 
> -- 
> Tom Chiverton
> Helping to enthusiastically incubate scalable information
> on: http://thefalken.livejournal.com
<http://thefalken.livejournal.com> 
> 
> ****************************************************
> 
> This email is sent for and on behalf of Halliwells LLP.
> 
> Halliwells LLP is a limited liability partnership registered in 
England and Wales under registered number OC307980 whose registered 
office address is at Halliwells LLP, 3 Hardman Square, 
Spinningfields, Manchester, M3 3EB. A list of members is available 
for inspection at the registered office. Any reference to a partner 
in relation to Halliwells LLP means a member of Halliwells LLP. 
Regulated by The Solicitors Regulation Authority.
> 
> CONFIDENTIALITY
> 
> This email is intended only for the use of the addressee named 
above and may be confidential or legally privileged. If you are not 
the addressee you must not read it and must not use any information 
contained in nor copy it nor inform any person other than Halliwells 
LLP or the addressee of its existence or contents. If you have 
received this email in error please delete it and notify Halliwells 
LLP IT Department on 0870 365 2500.
> 
> For more information about Halliwells LLP visit www.halliwells.com.
>

 

Reply via email to