Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
May be this will helps Table Column cssStyle
I tested it and it works with datatables.
// Some.view.php
DataTables::create(array(
"dataSource"=>$this->dataStore('service_data')
,"name"=>"tbl_service_data"
,'cssClass'=>array(
'th' => function($colName) {
return $colName;
},
)
,"columns"=>array(
, "svc_dt"=>array(
"label"=>"Service Date",
"type"=>"datetime",
"displayFormat"=>"Y-m-d"
)
,"svc_tm"=>array(
"label"=>"Time",
)
,"svc_type"=>array(
"label"=>"Service Type",
"formatValue"=>function($value,$row){
return ucwords(strToLower($row['svc_type']));
}
)
,"svc_priority"=>array(
"label"=>"Priority",
)
,""=>array(
"label"=>"Contact Name",
"formatValue"=>function($value,$row){
return ucwords(strToLower($row['contact_last'])) . ', ' . ucwords(strToLower($row['contact_first']));
}
)
)
,"options"=>array(
"paging"=>true,
"searching"=>true,
"fixedHeader"=>true,
)
));
And some css:
// custom.css
.svc_type{
width:20em;
}
thank you:) It is possible this way as well using .
var table= $('#example').DataTable( {
columnDefs: [
{ width: 20, targets: 0 },
{ width: 200, targets: 3 },
{ width: 20, targets: 10 },
{ width: 20, targets: 11 },
{ width: 20, targets:12 },
{ width: 20, targets: 13 },
],
}
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo