Header with Selectbox to perform various operation

Header with Selectbox to perform various operation

birobiro Posts: 12Questions: 7Answers: 0

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

This discussion has been closed.