Ben,

>I have a table of data, where I want the end user to be able to edit a
>field in a particular one of the columns. A good example would be a
>shopping cart with a quantity field for each item in the cart. 
>
One approach is to build the whole table as widgets. Create a widget, 
say LabelWidget, that does static text, and create TableGrid (probably 
derived from RepeatingFieldSet) that does the rows. In this arrangement 
validation will work fine with a variable number of rows.

But that's a bit of a pain - I expect you just want to build your table 
in the template, and insert the widgets as appropriate. I have done this 
successfully by pre-rendering each widget to text, and inserting the 
text. I had to call some widgets internals directly, and I'm trying to 
get rid of this code, but it does work. Can send you the details if you 
want to go down this route.

Paul

--~--~---------~--~----~------------~-------~--~----~
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