It sounds like you need a labelFunction for the DataGridColumn:

private function userNameLabelFunction( item : Object ) : String
{
  return item.firstName + ' ' + item.lastName;
}

and then in your DataGridColumn, just add this to the column's definition:

labelFunction="userNameLabelFunction"

Obviously, I don't know the setup of your Users object, so firstName and
lastName might not be appropriate, but hopefully you get the point and can
adapt the field references as appropriate.

Regards,
Dave.
Cynergy Systems, Inc.


On 5/8/07, headjoog <[EMAIL PROTECTED]> wrote:

  Hello - new on this group and to flex and was hoping for some
feedback...

I've been able to get a simple one-to-many association configured in
FDS and Hibernate. One table has Users, the other a list of records
that users created. I have a data grid that shows the list of records.
The list of records is returned correctly, but under the "createuser"
field where the user name should be displayed I get "[object Users]"
(which is the class that contains the user info). And I can't get
either the user id or the user name (which is what I really want)
diplayed in the grid.

How do you display the user in Flex? I have simple POJOs, have the AS
classes, and no errors in my logs. Can somebody clue me in?
I'll post some code snips if necessary.

Reply via email to