On Monday, December 17, 2018 at 5:46:45 AM UTC-8, isi_jca wrote:
>
> Dave:
>
> Dave, thanks for your time. The data is contained in another table and I 
> want it to be shown by means of a tooltip. Should I use jquery in this 
> case?.
>
> Regards.
>


I think my first choice would be a join, and then using icodk's answer from
<URL:https://groups.google.com/d/topic/web2py/c8D9IC0r9gM/discussion>
which assembles the tool tip ahead of time.

There is a "comments" feature of SQLFORM (and via that, SQLFORM.grid), but 
that seems to be for displaying an additional column rather than a tooltip, 
and I haven't played with it, so I can't tell you more.  And my search on 
tooltips only turned up the one thread that wasn't from the dim days of 
neolithic web2py.

If a join isn't practical, then go with the jQuery/LOAD option (references 
in The Book, as mentioned in my post in that thread).

By the way, I eventually noticed in your original post that you're 
assigning a function to something that seems not to know to treat a 
function as an executable; you'd want to have the output be assigned, 
instead.

Dave S
/dps


>
>
> El viernes, 14 de diciembre de 2018, 18:37:28 (UTC-5), Dave S escribió:
>>
>>
>>
>> On Friday, December 14, 2018 at 1:52:54 PM UTC-8, isi_jca wrote:
>>>
>>> Hi!
>>>
>>> Is possible to get data (a string) in this mammer?
>>>
>>>
>>> tpaciente.idarticulo.comment= lambda row : myfunction(row.idarticulo)
>>>
>>> In the grid form from view, it is show "<function <lambda> at 
>>> 0x7f604fce2aa0>"
>>>
>>> Can anybody help me?.
>>>
>>> Thanks in advanced.
>>>
>>
>> Perhaps you could provide a little more description of what you are 
>> trying to do.
>>
>> Do you want the comment to be displayed after the rest of the page 
>> (including the grid) is rendered?
>> Then you'd probably want to do a jQuery action.
>>
>> If the comment is being looked up in a table, and that table is different 
>> from the rest of the grid's table, you can probably do a join and use the 
>> results of the join in the grid call.
>>
>> if the string is being computed from user input [perhaps after the grid 
>> is rendered], you probably are back to a jQuery action.
>>
>> /dps
>>
>> A typical controller function (such as myapp/controllers/default.py ... 
>> def index())
>> can return a string a basic view will render it as body text.
>>  
>>
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to