This is a migrated thread and some comments may be shown as answers.

set MasterTableView.ShowGroupFooter in code not working

1 Answer 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Margo Noreen
Top achievements
Rank 1
Veteran
Margo Noreen asked on 10 Jul 2020, 03:03 PM

I would like to Hide/Show a group footer based on a condition.

 

I have tried to add code like this:

grid.MasterTableView.ShowGroupFooter = bSomeState; // boolean true/false value

 

I've tried adding that to the OnDataBound event, to the PageLoad event, to the Page PreRender event.  But nothing works.

 

For example, lets say that there is no declarative markup added to the grid, so the default for ShowGroupFooter is false.  Then I added a

    grid.MasterTableView.ShowGroupFooter = true

statement in various places in the codebehind.  The group footer is never shown.

Is there a solution here?

 

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 15 Jul 2020, 07:02 AM

Hi Margo,

 

Try using the DataBinding event handler to achieve this requirement:
https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/how-to/Common/using-the--getitems-getcolumn-and-getcolumnsafe-methods#columns

Any other later event would require you to call grid.Rebind() in order for the property to take effect.

I hope this will prove helpful.

 

Regards,
Eyup
Progress Telerik

Tags
Grid
Asked by
Margo Noreen
Top achievements
Rank 1
Veteran
Answers by
Eyup
Telerik team
Share this question
or