Table footer disappear when allowVirtualScrolling is false
Good morning.
Why the table footer disappears when allowVirtualScrolling is false, and it appears when allowVirtualScrolling is true? I would like to show the table footer also when allowVirtualScrolling is false.
Refer to the following code example.
I will be waiting for your reply, thank you in advance.
Regards, Luis Carlos.
SIGN IN To post a reply.
5 Replies
VN
Vignesh Natarajan
Syncfusion Team
April 3, 2019 11:46 AM UTC
Hi Luis,
Thanks for using Syncfusion products.
Query: “Why the table footer disappears when allowVirtualScrolling is false”
By default when allowVirtualScrolling is enabled in ejGrid, pager (footerElement) will be displayed at the bottom contacting the current page and total records. This footer element will not be shown in bottom when VirtualScrolling is not enabled. If you wish to render the pager at the bottom, kindly enable paging in the Grid.
Refer the below UG documentation for your reference
Please get back to us if you any queries.
Regards,
Vignesh Natarajan.
LC
Luis Carlos
April 4, 2019 09:45 AM UTC
Hi again.
Is there any way to enable the table footer without enabling paging neither virtual scrolling?
Thank you for your reply.
Regards, Luis Carlos.
MP
Manivannan Padmanaban
Syncfusion Team
April 5, 2019 11:49 AM UTC
Hi Luis,
Thanks for the update..
In virtual scrolling we have load the data based on page size without buffering the entire huge database(i.e. based on row height we have handled the page size for the generated rows).
But if we set allowVirtualScrolling as “false” then there is no purpose of on demand paging concept (i.e. the total rows are generated in the initial rendering itself). So, its not a valid case.
Regards,
Manivannan Padmanaban.
LC
Luis Carlos
April 5, 2019 12:12 PM UTC
Hello again.
Let me try to say the same thing another way to understand it better.
Is possible to show the total rows in the table footer when "allowVirtualScrolling" is false?
Thank you again, I will be waiting for your reply.
Regards, Luis Carlos.
VN
Vignesh Natarajan
Syncfusion Team
April 8, 2019 01:36 PM UTC
Hi Luis,
Query: Is possible to show the total rows in the table footer when "allowVirtualScrolling" is false?
We have achieved your requirement using the actionComplete and dataBound event of ejGrid. Please refer the below code example,
|
<div id="Grid"></div>
<div class="e-pagerstatusbar">
Total Rows count:
<span id="page"></span>
</div>
</body>
<script type="text/javascript">
…………..
$(function () {
$("#Grid").ejGrid({
…………….
dataBound:"databound",
allowFiltering:true,
actionComplete:"complete",
columns: [
………….
],
});
});
function databound(Args){
var count = this.model.dataSource.length;
$("#Grid").append($(".e-pagerstatusbar"));
$("#page").text(count); // append the page status to grid
}
function complete(args){
var count = this.model.currentViewData.length;
$("#page").text(count); // update the page count after action complete
}
</script>
|
Sample Link:
Output:
Refer our help documentation for your reference
Note: we have provided the solution for local data only.
Regards,
Vignesh Natarajan.
SIGN IN To post a reply.
- 5 Replies
- 3 Participants
-
LC Luis Carlos
- Apr 2, 2019 10:36 AM UTC
- Apr 8, 2019 01:36 PM UTC