sDefaultContent not being applied
sDefaultContent not being applied
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)
[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)
This discussion has been closed.
Replies