Feature: semi-dynamic options
Feature: semi-dynamic options
OK, that's maybe a misleading topic, but....
1. It'd be nice if aoColumns didn't have to have exactly the right number of columns, but rather assume null for missing columns.
2. I'm using some DOM tables that start out empty, and get rows added (statically from datatables' pov), so the tables can have 0, 1, 2... rows. When there are very few rows, it doesn't make sense to have sort/filter controls, so on the server side I'm setting bSort, bFilter, based on the number of rows. It'd be more convenient if I could (for instance) set bSort = 3, and then have the sorting controls only if the number of rows is >= 3. Similarly for bFilter, bPaginate, maybe some others that I'm not using.
Or, if the b in bSort means 'boolean', then nSort instead.
1. It'd be nice if aoColumns didn't have to have exactly the right number of columns, but rather assume null for missing columns.
2. I'm using some DOM tables that start out empty, and get rows added (statically from datatables' pov), so the tables can have 0, 1, 2... rows. When there are very few rows, it doesn't make sense to have sort/filter controls, so on the server side I'm setting bSort, bFilter, based on the number of rows. It'd be more convenient if I could (for instance) set bSort = 3, and then have the sorting controls only if the number of rows is >= 3. Similarly for bFilter, bPaginate, maybe some others that I'm not using.
Or, if the b in bSort means 'boolean', then nSort instead.
This discussion has been closed.
Replies
1. 110% agree. I hope to address this in a future revision in the not two distance future :-)
2. What you could do is use fnDrawCallback to check how many rows are on display (or if pagination is needed etc) and show/hide the table controls based on that information. This has worked successfully for others who have implemented this (although I don't have any code samples to hand - sorry).
Allan