New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Summary total in the footer column #1239
Comments
Use the same query passed on DT like: ->with('sum_balance', $dataTableQuery->sum('balance')) |
$dataTableQuery - This is passed without filtering and|or searching data. How get a parsed query with all binding params? |
How to display this in blade ? |
@yurik3zzz you can use withQuery api for that on the latest version. @prakash-pokhrel you would need to handle the display via javascript by accessing the ajax response data. Something like: |
@yajra I still didn't get it. Should I place this inside html() function of datatable or put directly in blade. Btw, I am using datatable as service |
Try adding a script on drawCallback. $('#users-table').on('draw.dt', function() {
$('#total').val( LaravelDataTables["users-table"].ajax.json().total )
}) |
If you are using the latest html package v4.0, you can do something like: public function html()
{
...
->ajax()
->drawCallback('function() { $("#total").val( this.api().ajax.json().total ) }')
... |
Hi, Is this id inside table or in other html element ? |
It's a jquery selector for an element using id. |
Summary of problem or feature request
How make summary to footer column?
Code snippet of problem
-->
System details
The text was updated successfully, but these errors were encountered: