![]() DataTables 1.9. Set fnDrawCallback to respond to window resize events. Set fnPreDrawCallback to only initialize the responsive datatables helper once Set fnRowCallback to create expand icon. I'm initializing the table like this: $(document). Create the datatables instance with the following DataTables 1.9.x Set bAutoWidth to false. Is that the expected behavior? My only issue with just setting that to true is that it then makes the rendering of the table too wide for the iPad screen and forces the user to scroll, whereas if I keep scrollX=false and turn on responsive, the table fits fine on an iPad screen, so I'd like to use that if possible (but to have my desktop users have the columns resize automatically on a window size change). My small issue: in my table, the columns don't resize when the window size is changed, unless scrollX is set to true. Much of what I have done here is borrowed from FooTable.I've just switched over to using DataTables, and I'm really loving its capabilities. In my opinion, their implementation for a responsive table is the best to date. ![]() This event can be used to inform external libraries and controls that Responsive has changed the visibility of columns in the table in response to a resize or recalculation event. Please note - this property requires the Responsive extension for DataTables. Thanks to Brad Vincent and his friend Steve for making the awesome responsive FooTable. The columns displayed by Responsive has changed due to a resize. Thanks to Allan Jardine for making the best data table plugin for jQuery. Passes the jquery tr object for the detail row as an argument. If no breakpoint class is found for a column, Responsive will determine automatically if the column should be shown or not at any particular viewport width. You can refer to this or this documentation see how to do this. How to make columns of datatables. Create a wpDataTable and enable responsiveness Create a table manually, or from a data source, and enable the Responsive switch First, create a wpDataTable using any of the available input sources using the Table Creation Wizard.
0 Comments
Leave a Reply. |