Nguyễn Thiện Hùng
Nguyễn Thiện Hùng
- For query: Differences between them: call Datatable::query(Modal::query()).... - Example: ``` php if (Datatable::shouldHandle()) { return Datatable::query(Modal::query())->showColumns(array( 'id', 'name', 'code', 'parent', 'description' ))->setAliasMapping() // ->searchColumns('name') ->orderColumns('cn_ma:id', 'cn_ten:name') ->make(); } }...
You try? http://www.datatables.net/plug-ins/api/fnReloadAjax ``` javascript $('#table').dataTable().fnReloadAjax(); ``` And Callback ``` javascript fnServerParams: function(aoData) { aoData.push({name: "site_id", value: $('#site').val()}); } ```
When filter with data-ranger, you must add param and proccess data before Call Datatable::query or collection: Example: WHen change Combox Site -> auto reload to filter Datatable. ``` js $(document).ready(function()...
The Regex of database alway different (SQLlite, MySQL, Por ...). Chumper/Datatable not support. Good Luck.
@userhuman used ->setOptions(array("bStateSave" => true)) or edit file config.php ?
@illuminate3 jQuery needs to be the first script you import. The first script on your page appears to be a jQuery plugin, which is likely generating an error since jQuery...
To @webcrazy ``` php public function getDatatable() { die(); } ``` And check again `json`. if Empty you try: ``` php public function getDatatable() { dd(User::all(['name','nrc','company','email','phone','status'])); } ``` What you...
@webcrazy You check again Model "User". First line: Invaild. And if All ok, you try with Model orther by 'Method two'. If first line sample with Model 'User:All', i sure...
@ahmedsliman Class for Column: http://legacy.datatables.net/usage/columns ``` php ->setOptions( 'aoColumns' => array( array( // 'sTitle' => trans('management-system::units.titles.id') , 'sClass' => 'text-center', 'sWidth' => '30pt', 'aDataSort' => array( 0, 1 ) ,...
You try: ``` js .on('click', 'tbody tr td:not(:nth-child(' + tTargets + 1 + ')) ``` You can change event "click" example: ``` js this.gridObject = $(this.target).dataTable(gridOption); if ($.isFunction(this.options.rowClick)) { var...