I'd like to have a grid in which the first column contains no header, and consists of checkboxes, the last couple of columns are columns of links (generated with the 'links' parameter), and the intermediate columns are generated from database fields with the 'fields' parameter. What's the best way to go about generating the column of checkboxes? Thank you.
相关问题
- Referencing a table in web2py before defining it
- web2py check password in form
- can we use java code in web2py application code?
- web2py git integration - localhost & pythonanywher
- How can I throttle Python threads?
相关文章
- How can I throttle Python threads?
- how to pass value from view to controller in web2p
- composite key in web2py
- 在G-WAN(通常Python的上G-WAN架构)的web2py运行(Running Web2Py
- 硒的web2py从killer-web-development.com不起作用(selenium a
- 插入一些元组成的web2py表(insert some tuples into table in w
- 如何最好地设计在GAE上的日期/地理邻近查询?(How to best design a date/
- angularJS与web2py的:从纳克/ JavaScript的调用蟒蛇/ HTML(angul
That will add a column of checkboxes on the left and a "Submit" button at the bottom of the grid. When the "Submit" button is clicked, the action that generated the grid will receive a list of record IDs for the checked records, and those IDs will be passed to the "selectable" argument (which should be a callable that takes a list of record IDs, as above).
You can control the label of the submit button and even add additional functions to apply to the checked records by passing a list of lists/tuples as the "selectable" argument:
In that case, at the bottom of the grid you will get buttons labeled "Action 1" and "Action 2", and the appropriate action will be executed depending on which button is clicked. The third element in each tuple is an optional CSS class that will be added to the button element of that action.