Link to home
Start Free TrialLog in
Avatar of llkhor
llkhor

asked on

how to sort rows in grid using lookup field column?

Hi,

Is there anyway to sort rows in grid using column that is based on lookup field?

The grid contains one lookup field that is pointing to the master file record ( i.e. EmployeeName ), I need to sort the rows based on the Employee's Name.  How?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Mohammed Nasman
Mohammed Nasman
Flag of Palestine, State of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of llkhor
llkhor

ASKER

mnasman :  I know both the methods you described, i am just curious if u could do sorting with lookup field (kind=fkLookup) instead.  

Thanks.
only with a query by including the field, which is referenced like

select a.*, b.lookupresultfield from tableA a, tableB b where a.lookupidfield = b.idfield order by b.lookupresultfield

in some databases b.fields must not be included into the fieldlist after the select in some other databases is this a must

meikl ;-)
Avatar of llkhor

ASKER

Thanks for the feedbacks....  
Upon review of the comments here, I am recommending this disposition:

        points to mnasman

Please post a comment if you disagree.

DanRollins -- EE database cleanup volunteer
per recommendation.

SpideyMod
Community Support Moderator @Experts Exchange