sDefaultContent not being applied

sDefaultContent not being applied

dmolavidmolavi Posts: 65Questions: 0Answers: 0
edited July 2011 in General
Here's my datatables declaration:
[code] var oTable = $('#item_table').dataTable({
"bFilter": true,
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"iDisplayLength" : 25,
"sDom": '<"H"lfr>t<"F"ip>',
"bSort": true,
"bProcessing": true,
"bAutoWidth": false,
"oLanguage": {
"sSearch": "Search:"
},
"aoColumns": [
{ "mDataProp": null, "bSortable": false, "sClass": "control center read_only", "sDefaultContent":'' },
{ "bSearchable": true, "bSortable": true },
{ "bSearchable": true, "bSortable": true },
{ "bSearchable": false, "bSortable": false },
{ "bSearchable": false, "bSortable": false },
{ "bSearchable": false, "bSortable": false },
{ "bSearchable": false, "bSortable": false, "bVisible":false },
{ "bSearchable": false, "bSortable": false, "bVisible":false },
{ "bSearchable": false, "bSortable": false, "bVisible":false }
]
});[/code]

And the HTML is fairly straighforward (content gotten from php):
[code]



Manufacturer
Roadname
Road No.
Type
Description






<?php
$fill = 0;
foreach($edit_data as $temp_edit_row) {
if($fill) {
$tr = 'tr class="odd"';
} else {
$tr = 'tr class="even"';
}
echo '<'.$tr.' id="'.$temp_edit_row[5].'">'.$temp_edit_row[2].''.$temp_edit_row[3].''.$temp_edit_row[1].''.$temp_edit_row[4].''.$temp_edit_row[0].''.$temp_edit_row[6].''.$temp_edit_row[7].''.$temp_edit_row[8].'';
$fill = !$fill;
}
?>

[/code]

However, the sDefaultContent for the first column is not being applied (using the same syntax, etc as the drill down example). Any ideas as to why? (sImageUrl is declared earlier in the JS code)

Replies

  • dmolavidmolavi Posts: 65Questions: 0Answers: 0
    Should have followed up to this. I got it working, it appears sDefaultContent is used only when server-side processing is used. I rewrote some code and now it's working as intended.
This discussion has been closed.