Your item databound event looks something like grd_ItemDataBound(object sender,GridItemEventArgs e) { //catch the footer element if(e.Item. ItemType==GridItemType. GroupFooter) { (e.Item.
FindControl("yourTextBox") as TextBox). Text = your calculated value } }.
– teedyay Dec 17 '09 at 17:47 you would use Footer Template in your grid from : example in telerik. Com/help/aspnet-ajax/… – ram Dec 17 '09 at 17:57 Ah, of course! My grid's being generated dynamically so I'll have to figure out how to create the templates programmatically, but this looks like the way to go.
Thanks. – teedyay Dec 18 '09 at 9:43.
I double-checked whether unique name indexer works with Q2 2009 and Q3 2009 version of RadGrid for ASP. NET AJAX and it worked on my machine. Check your version and ask for more help using the Telerik forums if needed.Dick.
Thanks - yeah, it looks like I'm on 2008 Q2. I'll see if I can get my hands on a newer version. – teedyay Jan 8 '10 at 11:13.
Try this In Aspx page: <telerik:GridBoundColumn Aggregate="Sum" DataField="Price" DataFormatString="{0:C}" EmptyDataText="0" FooterText="Total :" HeaderText="Price" UniqueName="Price"> (or) In Code behind page: Private Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI. GridItemEventArgs) Handles RadGrid1. ItemDataBound Try Dim Item As GridDataItem Dim value as Double Select Case (e.Item.
ItemType) Case Telerik.Web.UI.GridItemType. AlternatingItem, Telerik.Web.UI.GridItemType. EditItem,Telerik.Web.UI.GridItemType.
Item,Telerik.Web.UI.GridItemType. SelectedItem Item = e. Item '------ Calculate Total amount ----------- Item("TotalPayment").
Text = CDbl(Item("TotalPayment"). Text) value += CDec(Item("TotalPayment"). Text) Case Telerik.Web.UI.GridItemType.
Footer '------ Display the total amount in Footer ------ Dim footerItem As GridFooterItem = e. Item If Not RadGrid1.Items. Count = 0 Then footerItem("TotalPayment").
Text = "Total :" + value End Select Catch ex As Exception End Try End Sub.
Well, if you use custom formula to calculate results instead of standard aggregates like sum, average and so on, you probably have to rely on your own logic. The cells from the group footers should be indexable by unique name - I remember this was not supported with previous Telerik ASP. NET Grid versions but this was added in more recent versions - Q2 or Q3 2009.Dick.
Should be... but aren't. :-( – teedyay Dec 17 '09 at 17:28 hmm, not sure why -1 . Can you explain?
– ram Dec 17 '09 at 17:36 @Ram - the tooltip for down-voting is "This answer is not useful", which I'm afraid describes this answer. In my question I'd said that accessing group footer cells using the UniqueName as an index doesn't work. Maybe this is fixed in later versions, but that doesn't help me, unfortunately.
– teedyay Dec 17 '09 at 23:01.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.