Private
Sub btnExport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExport.Click
ConfigureExport()
radMonthlyCommissions.MasterTableView.ExportToExcel()
End Sub
Public Sub ConfigureExport()
radMonthlyCommissions.ExportSettings.ExportOnlyData =
True
radMonthlyCommissions.ExportSettings.IgnorePaging =
True
radMonthlyCommissions.ExportSettings.OpenInNewWindow =
True
End Sub
<asp:ObjectDataSource ID="ODS_Country" runat="server" EnableCaching="True"
SelectMethod="GetData"
TypeName="Telerik.DataSet1TableAdapters.REF_CountryTableAdapter">
</asp:ObjectDataSource>
<telerik:RadComboBox ID="rcb_Country" Runat="server"
DataSourceID="ODS_Country"
DataTextField="Country" DataValueField="OID"
EnableItemCaching="True" >
</telerik:RadComboBox>
I have a page with one radgrid on it. This page contains different sets of columns depending on how the user gets to the page. In all cases the grid offers Grouping. Since I cannot declare the columns ahead of time and I allow the user to group by whatever he/she chooses, how can i get specific columns to show aggregates in the group footers when grouping is active?
I can get footers to contain text by doing something simple like:
| Protected Sub Radgrid_ItemDataBound(ByVal source As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound |
| If TypeOf e.Item Is GridGroupFooterItem Then |
| Dim footer As GridGroupFooterItem = e.Item |
| Try |
| footer("ReworkCosts").Text = "Sum of Rework Costs: $" |
| Catch ex As Exception |
| End Try |
| Try |
| footer("MaterialCosts").Text = "Sum of Material Costs: $" |
| Catch ex As Exception |
| End Try |
| Try |
| footer("ScrapCosts").Text = "Sum of Scrap Costs: $" |
| Catch ex As Exception |
| End Try |
| Try |
| footer("DefectCosts").Text = "Sum of Defect Costs: $" |
| Catch ex As Exception |
| End Try |
| Try |
| footer("QNote").Text = "Count of Qnotes: " |
| Catch ex As Exception |
| End Try |
| Try |
| footer("MRCs").Text = "Count of MRCs: " |
| Catch ex As Exception |
| End Try |
| Try |
| footer("SCARs").Text = "Count of SCARs: " |
| Catch ex As Exception |
| End Try |
| End If |
| End Sub |
...but I don't know how to access all of the items in a specific column of that group so that I can add/count them and concatenate themm to the end of my string.
Any recommendations?
I am using VB.NET, .NET 3.5
| protected void gridFavorites_ItemDataBound(object sender, GridItemEventArgs e) |
| { |
| if (e.Item.DataItem != null) |
| { |
| IFavorite fav = (IFavorite)e.Item.DataItem; |
| if (fav.CmsPageId == Guid.Empty) |
| // Where to go from here to set readonly=true? |
| } |
| } |
| $find("<%= grdEntityAttributes.ClientID %>").get_masterTableView().get_dataItems()[document.getElementById("selectedRow").value] |