Page 1 of 1

Grid Summary For Selected Records Only

Posted: Thu Apr 08, 2021 3:27 pm
by gopal.gupta

We need to implement grid summary for only selected records : https://www.bryntum.com/docs/grid/#Grid/feature/Summary

Seems like with custom summary function this can be acheived but I am able to access only store related elements inside custom summary funcion and store does not maintain selected rows, selected rows are maintained over grid So Is there any way to check for whether a row is selected or not inside custom summary function Or Can we acess grid inside this custom summary function so that can check for record is selected or not. CAn suggest something or Am i missing something here?
Also I have seen there is a feature request regarding the same so Is there any update on this or Any idea how soon this is going to be avaiable ?

Feature request : viewtopic.php?f=43&t=10817


Re: Grid Summary For Selected Records Only

Posted: Thu Apr 08, 2021 3:34 pm
by mats

Can we acess grid inside this custom summary function so that can check for record is selected or not

Currently not, but you can simply create a closure so you have access to the grid instance from outside. Ticket opened to add the grid as a param to the renderer method. https://github.com/bryntum/support/issues/2631


Re: Grid Summary For Selected Records Only

Posted: Thu Apr 08, 2021 4:47 pm
by mats

Good news, this is now implemented!


Re: Grid Summary For Selected Records Only

Posted: Fri Apr 09, 2021 11:52 am
by gopal.gupta

You mean grid is now acessible in column rendered i.e : https://www.bryntum.com/docs/grid/#Grid/column/Column#config-renderer
OR something else. Please correct me if i am missing something.
Secodly If the above mentioned is true then rendere has no impact of selectionChange https://www.bryntum.com/docs/grid/#Grid/view/mixin/GridSelection#event-selectionChange
So how this grid instance inside renderer is gonna help in checking a record is selected or not? because with refresh method https://www.bryntum.com/docs/grid/#Grid/feature/Summary#function-refresh we can refresh summaries on selectionChange event but how a record is selected or not is not clear to me.
Could you please suggest something here?


Re: Grid Summary For Selected Records Only

Posted: Fri Apr 09, 2021 1:15 pm
by mats

I mean we now support a new mode updating summary based on selected records. Will be part of next release


Re: Grid Summary For Selected Records Only

Posted: Mon Apr 12, 2021 9:01 am
by gopal.gupta

Will it be part of release 4.1.0 or next to this?


Re: Grid Summary For Selected Records Only

Posted: Mon Apr 12, 2021 9:22 am
by mats

4.1.0 was already released, look above at the tag (or go to the GitHub issues) and you see the 4.1.1 milestone.