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

Footer Template in GridColumnSettings

2 Answers 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Minal
Top achievements
Rank 1
Minal asked on 20 Jun 2012, 10:12 AM
Hi,
I am using Telerik MVC controls of version 2012.1.214.235. This is a trial version.
i can see the FooterTemplate available for GridColumnSettings. But no where i find the example to how to use it for Sum or Count etc.
Can you please provide me example or syntax to use GridColumnSettings FooterTemplate property.
i need to use Agreegate sum function in my POC.
Awaiting for early reply.
Thanks.

2 Answers, 1 is accepted

Sort by
0
Ben
Top achievements
Rank 1
answered on 21 Aug 2012, 01:11 PM
Hi,

I have a similar problem. I have a grid with 12 columns, I need to add in 10 of them a footer that sums the total value of all the values in the column. I have my controller with the gridcolumn settings like this:

new GridColumnSettings { Member = "Post", Title=WorkDetailsResource.Post, Width = "100px" },
new GridColumnSettings { Member = "Name", Title=CommonResource.Name, Width = "100px" },
new GridColumnSettings { Member = "Performed", Title =WorkDetailsResource.Performed , Width = "100px" },
new GridColumnSettings { Member = "Invoiced", Title=WorkDetailsResource.Invoiced, Width = "100px" },
 ...

return PartialView(model);                       

And now I need to add the footer contains the sums but I can't seem to find how to do this... Anyone has an idea?
0
Deepika
Top achievements
Rank 1
answered on 08 Jun 2013, 11:54 AM
Hi,

I also have the similar requirement to add the footertemplate in columnsettings from controller.

However, It is giving the following error.
Property or indexer 'Telerik.Web.Mvc.UI.GridColumnSettings.FooterHtmlAttributes' cannot be assigned to it is read only.

Please let me know if you were able to solve this. Or does this feature is supported for runtime binding columns.

Thanks,
Deepika
Tags
Grid
Asked by
Minal
Top achievements
Rank 1
Answers by
Ben
Top achievements
Rank 1
Deepika
Top achievements
Rank 1
Share this question
or