Using gizmo in Data Table

12 views
Skip to first unread message

ezra.j.rice

unread,
Oct 20, 2020, 11:37:09 AM10/20/20
to Tethys Platform
Does anybody know how to use a SelectInput gizmo inside of the DataTableView as one of the table cells? Is this possible? I tried, but am getting the input gizmo's options as text inside the cell.
See https://datatables.net/examples/api/form.html for an example of what I'm hoping to be able to do. Thanks in advance.

swainn

unread,
Nov 11, 2020, 10:47:03 AM11/11/20
to Tethys Platform
I don't think it is possible to embed gizmos in one another. I have done a similar thing using straight HTML. It's not too difficult.

ezra.j.rice

unread,
Nov 11, 2020, 10:53:11 AM11/11/20
to Tethys Platform
Thanks Nathan! I did eventually figure out what you just recommended. You can create a normal table in HTML using the gizmos in the desired fields and then initialize the DataTable using javascript after the DOM has finished loading. If you try to add new rows after the DataTable is initialized, you will have to do the opposite where you define the table row and gizmos in straight HTML then initialize the nested gizmos after the new row has been added to the DataTable.
Reply all
Reply to author
Forward
0 new messages