I am sorry for the lag... I will try to give you pointers tonight (in
a few hours) ...

I do lot of links in datagrids not in ajax ones... I've got some ideas though :)

Regards,

Florent.

On 1/2/07, jo <[EMAIL PROTECTED]> wrote:

Florent Aide wrote:
> Hello Jose,
>
> You need to be a little more specific... I do links and js:onclick()
> inside datagrid all the time but  not in a generic (enough) way.
>
> Have you got an example of what you are trying to achieve ?
>
> We could use your own example as a base for answering you...
>
> Regards,
>
> Florent Aide

Hi Florent,

here a silly example...
----------------------------------------------------
grid = AjaxGrid(refresh_url="search")
class Controller(object):
    @expose(template="kid:sicer.templates.comuni.test5")
    def index(self):
            return dict(acfield=grid)
    @expose(format="json")
    def search(self):
            date = datetime.today()
            hour = date.strftime('%H')
            minute = date.strftime('%M')
            second = date.strftime('%S')
            t = long(time.time() * 1000)
            r = long(random.random() * 100000000000000000L)
            return dict(
                headers = ["Hour", "Minute", "Second"],
                           rows = [
                                  [r+1, r+2, r+3],
                                  [r+11, r+12, r+13],
                                  [r+21, r+22, r+23],
                                  ],
                          )
------------------------
this script display a grid like this:

Hour | Minute | Second
--------------------------------
1212|123123|23123123
3231|322312|23123123
4433|333333|21212122

I would like to add an onclick event to rows,
but, I don't know how to pass attrs to it, seems the only parameters
used by AjaxGrid are:

    params
    defaults
    refresh_text
    id

jo


>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to