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

How do I render a control in a group header?

1 Answer 52 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Thilo
Top achievements
Rank 1
Thilo asked on 13 Apr 2018, 12:03 AM

I have an  chart (sparkline) I am trying to render into a group header.

I have no problems accessing the group header and pushing text to it, but have no idea how to render a control and reading through all the documentation I haven't found out how to do it.

Simple rendering of text example:

       RadGrid1.MasterTableView.ColumnGroups.FindGroupByName("TrendChartHeader").HeaderText = "Hello World.";

Thanks for any assistance anyone can provide.

 

~T

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 17 Apr 2018, 11:22 AM
Hi,

The HeaderText is just a literal for the text, so you cannot add controls there.

You can use the GroupHeaderTemplate under MasterTableView to add controls decoratively: https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/functionality/grouping/group-header-and-footer-templates.

I'm attaching here a small sample that shows how you can put controls in the header, data bind them, and access their parent values (aggregates).


Regards,
Marin Bratanov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Thilo
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or