This is from my view page, pulled out the php portions.
use \koolreport\datagrid\DataTables;
DataTables::create(array(
"dataSource"=>$this->dataStore("UserDB"),
"themeBase"=>"bs3", // Bootsrap 3 or 4
"cssClass"=>array(
"table"=>"table table-striped table-bordered",
"td"=>"size14"
),
"options"=>array(
"searching"=>true,
"paging"=>true,
"fixedHeader"=>true,
"select"=>true,
"order"=>array(
array(3,"asc") //Sort by last_name asc
),
),
"columns"=>array(
"ID"=>array(
"type"=>"number",
"thousandSeparator"=>"",
),
"locale"=>array(
"type"=>"number",
"thousandSeparator"=>"",
),
"first_name"=>array(
"type"=>"string",
),
"last_name"=>array(
"type"=>"string",
),
"company"=>array(
"type"=>"string",
),
"acct_name"=>array(
"type"=>"string",
),
"emailAddress"=>array(
"type"=>"string",
),
"phone"=>array(
"type"=>"string",
),
"mobile"=>array(
"type"=>"string",
),
"package_price"=>array(
"type"=>"number",
"prefix"=>"$",
"decimals"=>2,
"thousandSeparator"=>",",
"label"=>"pkg_price",
),
"creation_date"=>array(
"type"=>"string",
),
"neg_price"=>array(
"type"=>"number",
"prefix"=>"$",
"decimals"=>2,
"thousandSeparator"=>",",
),
"payment_auth"=>array(
"type"=>"number",
"thousandSeparator"=>"",
),
),
));