I'm not quite sure what you're doing here or how that makes the row a link, 
but as a side note, in Python you can (and should) do:

for row in grid.elements('tr'):
  row[0] = TD(row[6][0])
  row[6][0] = ''

Not only is the code simpler, but it calls grid.elements('tr') only once 
instead of n+1 times (where n is the number of rows).

Anthony

On Monday, May 13, 2013 3:29:09 PM UTC-4, Thomas Wimmer wrote:
>
> until i find the solution, this is my workaround:
>
> i create a link with the first columns title
> and then i copy that link to first col, origin content is deleted:
>
> for i in range(1,len(grid.elements('tr'))): # all <tr>
> grid.elements('tr')[i][0] = TD(grid.elements('tr')[i][6][0]) # copy 6.1 
> to 1. column
> grid.elements('tr')[i][6][0] = '' # delete 6.1 column content
>
>
>
> Am Montag, 13. Mai 2013 20:56:47 UTC+2 schrieb Richard:
>>
>> Hmm... Maybe you could just move the button to the left??
>>
>>
>> buttons_placement = 'right',
>> links_placement = 'right'
>>
>>
>> These are SQLFORM.grid() switch...
>>
>> Richard
>>
>>
>> On Mon, May 13, 2013 at 2:18 PM, Thomas Wimmer <[email protected]> wrote:
>>
>>> i found a similar jquery script here:
>>> http://www.electrictoolbox.com/jquey-make-entire-table-row-clickable/
>>>
>>> but i dont use jquery in my app und would prefer another way...
>>>
>>> Am Montag, 13. Mai 2013 19:56:19 UTC+2 schrieb Richard:
>>>
>>>> You will need a little touch of jquery I gues...
>>>>
>>>> Something like this :
>>>>
>>>> <script>
>>>> $('#myTable tr').click(function() { 
>>>>     var url = "{{=URL(f='YOURCONTROLLERFUNC'**, 
>>>> args=$(this).(':first').val()}**}"* // If the first column of your 
>>>> table containt the id of your record*
>>>>     window.location.assign(url)
>>>>  }); 
>>>> </script>
>>>>
>>>> CODE NOT TESTED
>>>>
>>>> Richard
>>>>
>>>>  -- 
>>>  
>>> --- 
>>> 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/groups/opt_out.
>>>  
>>>  
>>>
>>
>>

-- 

--- 
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/groups/opt_out.


Reply via email to