Header with Selectbox to perform various operation
Header with Selectbox to perform various operation
Hi yall!
thank you for this awesome plugin!
i'd like to extend my table header with a select box which contains several option like "SUM, AVG, MIN, MAX" and so on.
i've added the select box to every column like
$(".dataTable thead").first().each(function(i) {
$('<tr class="combos"></tr>').prependTo($(this));
$('<tr class="bigheader"></tr>').appendTo($(this));
$(this).find('th').each(function(i) {
$('<th><select><option value="ciao">Ciao</option></select></th>').appendTo($('.combos'));
$('<th><input type="text" class="columnfilter"/></th>').appendTo($('.bigheader'));
})
})
First question: Is there a way to set the select only the columns which type is number?
Second question: When i set the "on Change" method to the select box, how can i perform the operation to that single column?
Thankyou
Answers
Hi
I have asked for a general feature in
https://datatables.net/forums/discussion/41755/header-column-filter-feature-out-of-the-box?new=1
Cheers, Michael
Thanks micheal!
i just found the solution!