> Hi Diez. Here's the code > > ==controllers.py=== > problem_grid = AjaxGrid(refresh_url="summarize_problems") > [...] > @expose(format="json") > def summarize_problems(self): > rows = [] > problems = identity.current.user.rosco_problems > for p in problems: > rows.append([p.problem_name, p.problem_rows, > p.problem_cols, p.problem_notes]) > > return dict( > headers = ["Nome del Problema", "Giorni", "Ore", "Note"], > rows = rows > ) > [...] > > ==main.kid=== > [...] > <div id="problem_grid"> > <span py:content="problem_grid.display()"></span> > </div> > [...] > > The problem is that if i try to concatenate some html in the rows, > like: > rows.append(["<a href='/'>"+p.problem_name+"</a>", p.problem_rows, > p.problem_cols, p.problem_notes]) > > the html is not parsed and while browsing the ajaxgrid in the browser, > html is shown 'as-is' (i.e. if, p.problem_name is "myProblem", > ajaxgrid shows up a row <a href='/'>myProblem</a>)
Ah, I'm sorry - I thought that the HTML-templating was causing troubles. But of course if the row is rendered using json.. Then things depend on how the ajax-grid deals with the output. The problem is that the ajaxgrid doesn't allow for that :( You need to patch widget.js inside the TG-distro for that to work. Diez --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

