3

I have a Telerik RadGdir that loads data dynamically using OnNeedDataSource. Once all the data is bound, I want to use the PreRender event to add a footer row that will contain text that describes the grid data. This grid then gets exported to Excel. The requirement is, I need to get the footer data into Excel.......

1) How do I add a footer row to a RadGrid with the specific text?

alternate solution....

2) How can I add the footer row with the specific text when performing the Excel Export?

MikeTWebb
  • 9,149
  • 25
  • 93
  • 132

2 Answers2

3

Enable the default footer of the grid (ShowFooter = true) and inject the text in it wiring the ItemDataBound server event (when e.Item is GridFooterItem). The footer should be included in the exported file as it is part of the control.

The other method to insert footer text on PreRender is to locate the footer using the GetItems method from the server API (see more on it here).

Dick Lampard
  • 2,256
  • 1
  • 12
  • 7
  • @Lampard....when I cast the footer to GridFooterItem gridFooterItem = aE.Item as GridFooterItem...and then looks at its properties. I don't see a Text property. Am I doing something wrong? Thanks – MikeTWebb Feb 17 '11 at 17:40
  • @Lampard...I figured it out. gridFooterItem["Column"].Text = "STUFF" where the column name is the name of the column where I want the footer text. Thanks for the help! – MikeTWebb Feb 17 '11 at 18:24
-1

I found an answer here on TelerikSupport - RadGrid footers forum

MikeTWebb
  • 9,149
  • 25
  • 93
  • 132
  • It is considered bad form to post a link like that. they move and break. instead, Put the information from the link that answers the question, then include the link as a reference – Richard June Oct 26 '16 at 12:43