button in columns of a tw.jquery flexigrid

View: New views
2 Messages — Rating Filter:   Alert me  

button in columns of a tw.jquery flexigrid

by notnow :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Everything is working good with the grid and the buttons are id'd and
capable of href to a template that includes  an item selector.  The id
of the button is the id of the record that will be used to filter data
for the item selector.  Is there any easyway to pass that button id to
the template with the item selector?  I can think of a possible work-a-
round with javascript, and dummy forms, but there has to be an easier
way.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to turbogears@...
To unsubscribe from this group, send email to turbogears+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: button in columns of a tw.jquery flexigrid

by notnow :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I think I found the answer and now feel stupid it was in the docs
http://turbogears.org/2.1/docs/main/Controllers.html#writing-controllers
probably the most important doc of turbogears.
I now have another problem instantiating this same widget. This is my
class with the widget

Any help would be appreceated.

class Club_Selector(ItemSelector):
    def __init__(self,schools_id):
        self.schools_id=schools_id
        ItemSelector.__init__(self,divID='item_selector_div',
                             width=600,
                             url='/save',
                             fieldLabel='Clubs',
                             labelWidth=80,
                             fromData=[],
                             toData=[],
                             msWidth=200,
                             msHeight=200,
                             dataFields=['code','desc'],
                             valueField='code',
                             displayField='desc',
                             fromLegend='Available',
                             toLegend='Selected',
                             submitText='Save',
                             resetText='Reset')

which raises the following error:

ValueError: ItemSelector requires a divID!

On Nov 9, 10:10 pm, notnow <ca17...@...> wrote:
> Everything is working good with the grid and the buttons are id'd and
> capable of href to a template that includes  an item selector.  The id
> of the button is the id of the record that will be used to filter data
> for the item selector.  Is there any easyway to pass that button id to
> the template with the item selector?  I can think of a possible work-a-
> round with javascript, and dummy forms, but there has to be an easier
> way.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to turbogears@...
To unsubscribe from this group, send email to turbogears+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---