filterHtmlOptions
If you want to style the content that the user enters into the filterbox, for example, "text-align: right" - then
'filterHtmlOptions'=>array('style'=>'text-align: right'),
will not work, because it will only stylize the outer cell of the table (td), and not the inner filter container (div) or input element:
<td style="text-align: right;"> <div class="filter-container"> <input> </div> </td>
What you can do is add a class to the outer cell of the table:
'filterHtmlOptions'=>array('class'=>'filterBoxRight'),
which will result in the following:
<td class="filterBoxRight"> <div class="filter-container"> <input> </div> </td>
Then run the following code:
$(document).on('ready', function(){ $('.filterBoxRight').find('.filter-container').find(':input').css({ 'text-align': 'right', }); });
Gerhard liebenberg
source share