Hi! Maybe using Datables <https://datatables.net> will feet your request.
пятница, 29 ноября 2019 г., 2:07:55 UTC+5 пользователь Josh B написал:
>
> Hi,
>
> Does anyone know how to add filters to table headers (so that the user can
> filter a table using table data from each column)?
>
> I'm struggling doing it with <select> and I've seen some ideal solutions
> in java but they don't seem to work for me (see below).
>
> Any help greatly appreciated - v new to programming!
> Thanks
> Josh
>
> my table views:
> <table class="table", id=table1>
> <tr>
> <th>Assigned to</th>
> <th>Type</th>
> <th>Priority</th>
> <th>Project</th>
> <th>Task description</th>
> <th>Attachments</th>
> <th>Due Date</th>
> </tr>
>
> {{for row in rows:}}
> <tr>
> <td><a href="{{=URL('edittasklist', args=row.tasklist.id)}}">
> {{=row.auth_user.FullName}}</a></td>
> <td>{{=row.tasklist.jobtype}}</td>
> <td>{{=row.tasklist.priority}}</td>
> <td>{{=row.tasklist.projectid}}</td>
> <td>{{=row.tasklist.heading}}</td>
> <td>{{=row.tasklist.attachment}}</td>
> <td>{{=row.tasklist.duedate}}</td>
> </tr>
> {{pass}}
> </table>
>
> java:
>
> 1. <script language="javascript" type="text/javascript">
> 2. //<![CDATA[
> 3. var table1_Props = {
> 4. col_0: "select",
> 5. on_change: false,
> 6. btn: true,
> 7. enter_key: false
> 8. }
> 9. var tf4 = setFilterGrid( "table1",table4_Props );
> 10. //]]>
> 11. </script>
>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/ac803030-1ea1-4883-9126-d371c448b5bf%40googlegroups.com.