So the only way to correct it is the way I used. Thanks Anthony.

segunda-feira, 29 de Abril de 2019 às 23:56:18 UTC+1, Anthony escreveu:
>
> Yes. It shows the values from the foreign table via "recursive selects" 
> (i.e., a separate query for each displayed row after the initial set of 
> records is fetched from the database), so it is not able to use that 
> information for sorting (which would require the initial query to be a join 
> with the foreign table).
>
> Anthony
>
> On Monday, April 29, 2019 at 6:26:10 PM UTC-4, jcrm...@gmail.com 
> <javascript:> wrote:
>>
>> Grid sorting sorts by id (in case of a FK) instead of shown value (eg. 
>> name). Is this normal?
>>
>> The only way I found to correct this behavior was to change the grid's 
>> table to a query, where in this query I include all the foreign fields (eg. 
>> name) directly and remove al the foreign keys.
>> Is this the correct/only way to solve it?
>>
>>
>> web2py 2.18.5
>> Python 3.7.1 x86
>> Firefox 66.0.3 x64
>> Windows 7 Pro x64 SP1+all upds
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to