We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Conditional Aggregate

Thread ID:

Created:

Updated:

Platform:

Replies:

151384 Feb 10,2020 09:48 AM UTC Sep 18,2020 07:08 AM UTC Angular - EJ 2 5
loading
Tags: Grid
Punit
Asked On February 10, 2020 09:48 AM UTC

I want to hide/show aggregate conditionally. If my condition is false then I don't want to create my aggregate footer and vice versa. 

Dhivya Rajendran [Syncfusion]
Replied On February 11, 2020 01:45 PM UTC

Hi Punit, 

Greeting form Syncfusion. 

We have analyzed your requirement and you can hide and  show the aggregates dynamically based on your condition. In that sample, we have buttons and in that button click we have shown and hide the aggregates of Grid. 

Please refer the below sample for more information.  


If the above does not meet your requirement then share more details that will helpful for us to provide and better solution as soon as possible. 

Regards, 
R.Dhivya 


Sergio cortes blanquez
Replied On August 7, 2020 01:20 PM UTC

And there isn't and other way? It isn't a good practice to access the DOM directly

Sujith Kumar Rajkumar [Syncfusion]
Replied On August 10, 2020 07:51 AM UTC

Hi Sergio, 
 
We checked your query and would like to let you know that you can access the Grid’s footer aggregate element from the Grid instance using which it can be hidden or shown. This is demonstrated in the below code snippet, 
 
hide() { 
    this.grid.aggregateModule.footerRenderer.contentTable.closest('.e-gridfooter').style.display = "none"; 
} 
 
show() { 
    this.grid.aggregateModule.footerRenderer.contentTable.closest('.e-gridfooter').style.display = "block"; 
} 
 
Sample based on this for your reference, 
 
 
Let us know if you have any concerns. 
 
Regards, 
Sujith R 


Sergio cortes blanquez
Replied On September 17, 2020 09:11 AM UTC

Thanks!

Sujith Kumar Rajkumar [Syncfusion]
Replied On September 18, 2020 07:08 AM UTC

Hi Sergio, 

You’re welcome. Please get back to us if you require any further assistance. 

Regards, 
Sujith R 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon