EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 12, 2026, 12:54:21 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
General Discussion
>
Change Total\Footer during Filter
Pages: [
1
]
« previous
next »
Print
Author
Topic: Change Total\Footer during Filter (Read 23584 times)
ahybits
Newbie
Posts: 26
Change Total\Footer during Filter
«
on:
October 22, 2015, 12:11:06 PM »
Hi,
I would like a method\suggestion on how to update the totals (either in a footer or some other place on the page) of the values shown after a filter has been used\set
Regards,
A
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: Change Total\Footer during Filter
«
Reply #1 on:
October 22, 2015, 08:12:13 PM »
You can call 'reloadFooter' method to update the footer rows with any data.
Code:
$('#dg').datagrid({
showFooter:true,
onLoadSuccess: function(data){
$(this).datagrid('reloadFooter', [
{name: 'name1', salary: 60000}
]);
}
});
Logged
ahybits
Newbie
Posts: 26
Re: Change Total\Footer during Filter
«
Reply #2 on:
October 23, 2015, 11:08:14 AM »
Thanks, but interesting, IF I have both showFooter and enableFilter, I only see the filter not the footer (having jsut showFooter to true, i see the footer)
Also, just for a clarification, if I use the filter, will the parameter of 'data' within onLoadSucecss only show the values filtered?
Logged
ahybits
Newbie
Posts: 26
Re: Change Total\Footer during Filter
«
Reply #3 on:
October 26, 2015, 01:10:05 PM »
Any ideas / confirmation on that data?
When i attempt that, i always get all data, not the filtered data
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: Change Total\Footer during Filter
«
Reply #4 on:
October 26, 2015, 07:21:24 PM »
The 'onLoadSuccess' event fires when data is loaded successfully. When you filter the datagrid, only the filtered data is loaded. Please refer to this example
http://jsfiddle.net/4L0qjbys/
Logged
ahybits
Newbie
Posts: 26
Re: Change Total\Footer during Filter
«
Reply #5 on:
October 28, 2015, 03:08:38 PM »
Awesome, got it working with your help; thanks
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...