FixedColumns problem

FixedColumns problem

anuprasanupras Posts: 6Questions: 0Answers: 0
edited November 2013 in General
Hi,
In my project i need help how to fixed column right side 1st column but that column is coming from "fnRowCallback" function.where some icons are there with each icons having different functionality.

HOw to fixed icon columns.(which is icons i.e not coming directly from database i called that values from "fnRowCallback" ).

Below is my code.

Please can help me out i m struggling for this from last 1 week .

***************************code ******************************

var i_btns = 3;
var rowCallback = ("fnRowCallback" in args) ? args.fnRowCallback : function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
$.data(nRow, 'site_act', aData);
$('td:eq('+i_btns+')', nRow).addClass("row-end");

aData.start_stamp = compensateOffset(aData.start_stamp);
var is_clmgr_or_admin = false;
var is_clauditor = false;
var perm = "<?php echo $account_type; ?>" ;
if ( ( aData['author_id'] == $("[name=user_id]").val() ) || ( is_clmgr_or_admin )) { //
switch(aData['status']) {
case 'Pending' :
case 'Pending*' :
$('td:eq('+i_btns+')', nRow).html(action_bar_not_started);
$('td:eq('+i_btns+')', nRow).append("");
break;
case 'Working' :
case 'Working*' :
$('td:eq('+i_btns+')', nRow).html(action_bar_started);
$('td:eq('+i_btns+')', nRow).append("");
break;
case 'Paused' :
case 'Paused*' :

$('td:eq('+i_btns+')', nRow).html(action_bar_paused);
$('td:eq('+i_btns+')', nRow).append("");
break;
case 'Resumed Work' :
case 'Resumed Work*' :
$('td:eq('+i_btns+')', nRow).html(action_bar_started);
$('td:eq('+i_btns+')', nRow).append("");
break;
case 'Complete' :
case 'Complete*':
case 'No Access':
case 'No Access*':
$('td:eq('+i_btns+')', nRow).html(action_bar_complete);
break;
}
return nRow;
};
var oTable = $(this).dataTable( {
"sScrollX": "50%",
"bScrollCollapse": true,
"bProcessing" : true,
"bServerSide" : true,
"sAjaxSource" : base_url + args.ajaxSource,
"bJQueryUI" : true,
"bStateSave" : true,
"bAutoWidth" : false,
"sPaginationType" : "full_numbers",
"oLanguage": {
"sProcessing": 'Processing Your Request. Please wait...'
},
"aoColumns" : [
{ "mDataProp" : "address", "sTitle" : "Customer
Address"},
{ "mDataProp" : "start_date", "sTitle" : "Schedule
Start Date"},
{"mDataProp" : null, "sTitle" : "Icons", "bSortable" : false }
],

"fnRowCallback" : rowCallback,

} );
new FixedColumns( oTable, {
"iRightColumns": 1,
"iRightWidth": 150,
} );


Thanks

***************************code *******************************

Replies

  • anuprasanupras Posts: 6Questions: 0Answers: 0
    plz can u suggest me what to do......i need help its little bit urgent for me........
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    PLease link to a test case showing the issue, as noted in the forum rules. My guess is that the issue is with the fixed columns since that is a cloned table. Does it work if you don't use FixedColumns.

    Allan
  • anuprasanupras Posts: 6Questions: 0Answers: 0
    hi
    Thanks for the reply...

    i don't have access of server.i m working on local.so i cant give test link...

    my concern is like..

    i want Icons column shold be fixed which is right most 1st column.

    {"mDataProp" : null, "sTitle" : "Icons", "bSortable" : false }

    Above code is right most 1st column

    but here value is null ,value are shown as icons which is mention in ""fnRowCallback" : rowCallback,"

    this function is trigger on column 3

    var i_btns = 3;

    becouse of 'null' when i m fixing that column it shows as null value.

    i want fixed this icon columns with icon images..

    for this how to do.


    plz zzzzzzzz help me .i think u can undersatand my problem..


    Thanks
  • anuprasanupras Posts: 6Questions: 0Answers: 0
    plz zzzzzzzz help me .i think u can undersatand my problem..
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Use sDefaultContent to provide a static string (icon) for a column if you are using mData as null .

    Allan
This discussion has been closed.