Server-side Individual Column Filtering by option
Server-side Individual Column Filtering by option
Martinez06
Posts: 1Questions: 0Answers: 0
Hi
I'm new in datatables, I use codeigniter and ignited Datatables.
I want to make indiviudal column filtering by selecting options on the bottom table
http://nevada.pl/datatables/server_side_test2.html
My controler:
[code]
public function getdata()
{
$this->load->library("Datatables");
$this->datatables
->select('id,name,surname')
->from('users')
->add_column('action', ' ', 'zlec_id') ;
echo $this->datatables->generate();
}[/code]
My view:
[code]
(function($) {
$.fn.dataTableExt.oApi.fnGetColumnData = function ( oSettings, iColumn, bUnique, bFiltered, bIgnoreEmpty ) {
if ( typeof iColumn == "undefined" ) return new Array();
if ( typeof bUnique == "undefined" ) bUnique = true;
if ( typeof bFiltered == "undefined" ) bFiltered = true;
if ( typeof bIgnoreEmpty == "undefined" ) bIgnoreEmpty = true;
var aiRows;
if (bFiltered == true) aiRows = oSettings.aiDisplay;
else aiRows = oSettings.aiDisplayMaster; // all row numbers
var asResultData = new Array();
for (var i=0,c=aiRows.length; i -1) continue;
else asResultData.push(sValue);
}
return asResultData;
}}(jQuery));
function fnCreateSelect( aData )
{
var r='', i, iLen=aData.length;
for ( i=0 ; i
I'm new in datatables, I use codeigniter and ignited Datatables.
I want to make indiviudal column filtering by selecting options on the bottom table
http://nevada.pl/datatables/server_side_test2.html
My controler:
[code]
public function getdata()
{
$this->load->library("Datatables");
$this->datatables
->select('id,name,surname')
->from('users')
->add_column('action', ' ', 'zlec_id') ;
echo $this->datatables->generate();
}[/code]
My view:
[code]
(function($) {
$.fn.dataTableExt.oApi.fnGetColumnData = function ( oSettings, iColumn, bUnique, bFiltered, bIgnoreEmpty ) {
if ( typeof iColumn == "undefined" ) return new Array();
if ( typeof bUnique == "undefined" ) bUnique = true;
if ( typeof bFiltered == "undefined" ) bFiltered = true;
if ( typeof bIgnoreEmpty == "undefined" ) bIgnoreEmpty = true;
var aiRows;
if (bFiltered == true) aiRows = oSettings.aiDisplay;
else aiRows = oSettings.aiDisplayMaster; // all row numbers
var asResultData = new Array();
for (var i=0,c=aiRows.length; i -1) continue;
else asResultData.push(sValue);
}
return asResultData;
}}(jQuery));
function fnCreateSelect( aData )
{
var r='', i, iLen=aData.length;
for ( i=0 ; i
This discussion has been closed.