Hi All ,
I have a radgrid which have child grid in which I have Footer template when I am exporting it by using "OnExcelMLExportRowCreated" event I am unable to get these items from footer template . and also unable to get the items of groupFooter template
<telerik:GridTemplateColumn HeaderText="column" UniqueName="column" SortExpression="Subtotal" FooterStyle-HorizontalAlign="Right" FooterAggregateFormatString="{0:0.000}">
<HeaderStyle Wrap="false" Width="230px" />
<ItemStyle Wrap="false" HorizontalAlign="Right" />
<ItemTemplate>
<asp:Label runat="server" ID="requestTotalLabel" Text='<%#Eval("total") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<table width="100%">
<tr>
<td style="white-space: nowrap">
<asp:Label runat="server" ID="requestTotalLabel" Text="request column:"></asp:Label>
</td>
<td>
<telerik:RadNumericTextBox runat="server" ID="requestTotalRadNumericTextBox" ReadOnly="true"
Width="100px" EnabledStyle-HorizontalAlign="Right" NumberFormat-DecimalDigits="3" CssClass="AlignedRadNumericTextBox">
</telerik:RadNumericTextBox>
</td>
</tr>
<tr>
<td style="white-space: nowrap">
<asp:Label runat="server" ID="addressLabel" Text="address:"></asp:Label>
</td>
<td>
<telerik:RadNumericTextBox runat="server" ID="addressRadNumericTextBox" ReadOnly="true"
Width="100px" EnabledStyle-HorizontalAlign="Right" NumberFormat-DecimalDigits="3" CssClass="AlignedRadNumericTextBox">
</telerik:RadNumericTextBox>
</td>
</tr>
<tr>
<td style="white-space: nowrap">
<asp:Label runat="server" ID="TaxesLabel" Text="Taxes:"></asp:Label>
</td>
<td>
<telerik:RadNumericTextBox runat="server" ID="TaxesRadNumericTextBox" ReadOnly="true"
Width="100px" EnabledStyle-HorizontalAlign="Right" NumberFormat-DecimalDigits="3" CssClass="AlignedRadNumericTextBox">
</telerik:RadNumericTextBox>
</td>
</tr>
<tr>
<td colspan="2">
<hr />
</td>
</tr>
<tr>
<td style="white-space: nowrap">
<asp:Label runat="server" ID="requestTotalLabel" Text="request Total:"></asp:Label>
</td>
<td>
<telerik:RadNumericTextBox runat="server" ID="requestTotalRadNumericTextBox" ReadOnly="true"
Width="100px" EnabledStyle-HorizontalAlign="Right" NumberFormat-DecimalDigits="2" CssClass="AlignedRadNumericTextBox">
</telerik:RadNumericTextBox>
</td>
</tr>
</table>
</FooterTemplate>
</telerik:GridTemplateColumn>
on code behind I am accessing it as
foreach (GridGroupFooterItem item in RadGrid.MasterTableView.GetItems(GridItemType.GroupFooter))
{
//set the colspan, so that the template cells are aligned with the grid columns
for (int i = 0; i <= item.Cells.Count - 1; i++)
{
(item.Cells[i] as TableCell).ColumnSpan = 1;
}
//color the footer labels based on the group index
//SetFooterLabelsColor(item);
}
foreach (GridGroupFooterItem item in OrderLineItemsRadGrid.MasterTableView.GetItems(GridItemType.GroupFooter))
{
//set the colspan, so that the template cells are aligned with the grid columns
for (int i = 0; i <= item.Cells.Count - 1; i++)
{
(item.Cells[i] as TableCell).ColumnSpan = 1;
}
}
thanks
I have a radgrid which have child grid in which I have Footer template when I am exporting it by using "OnExcelMLExportRowCreated" event I am unable to get these items from footer template . and also unable to get the items of groupFooter template
<telerik:GridTemplateColumn HeaderText="column" UniqueName="column" SortExpression="Subtotal" FooterStyle-HorizontalAlign="Right" FooterAggregateFormatString="{0:0.000}">
<HeaderStyle Wrap="false" Width="230px" />
<ItemStyle Wrap="false" HorizontalAlign="Right" />
<ItemTemplate>
<asp:Label runat="server" ID="requestTotalLabel" Text='<%#Eval("total") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<table width="100%">
<tr>
<td style="white-space: nowrap">
<asp:Label runat="server" ID="requestTotalLabel" Text="request column:"></asp:Label>
</td>
<td>
<telerik:RadNumericTextBox runat="server" ID="requestTotalRadNumericTextBox" ReadOnly="true"
Width="100px" EnabledStyle-HorizontalAlign="Right" NumberFormat-DecimalDigits="3" CssClass="AlignedRadNumericTextBox">
</telerik:RadNumericTextBox>
</td>
</tr>
<tr>
<td style="white-space: nowrap">
<asp:Label runat="server" ID="addressLabel" Text="address:"></asp:Label>
</td>
<td>
<telerik:RadNumericTextBox runat="server" ID="addressRadNumericTextBox" ReadOnly="true"
Width="100px" EnabledStyle-HorizontalAlign="Right" NumberFormat-DecimalDigits="3" CssClass="AlignedRadNumericTextBox">
</telerik:RadNumericTextBox>
</td>
</tr>
<tr>
<td style="white-space: nowrap">
<asp:Label runat="server" ID="TaxesLabel" Text="Taxes:"></asp:Label>
</td>
<td>
<telerik:RadNumericTextBox runat="server" ID="TaxesRadNumericTextBox" ReadOnly="true"
Width="100px" EnabledStyle-HorizontalAlign="Right" NumberFormat-DecimalDigits="3" CssClass="AlignedRadNumericTextBox">
</telerik:RadNumericTextBox>
</td>
</tr>
<tr>
<td colspan="2">
<hr />
</td>
</tr>
<tr>
<td style="white-space: nowrap">
<asp:Label runat="server" ID="requestTotalLabel" Text="request Total:"></asp:Label>
</td>
<td>
<telerik:RadNumericTextBox runat="server" ID="requestTotalRadNumericTextBox" ReadOnly="true"
Width="100px" EnabledStyle-HorizontalAlign="Right" NumberFormat-DecimalDigits="2" CssClass="AlignedRadNumericTextBox">
</telerik:RadNumericTextBox>
</td>
</tr>
</table>
</FooterTemplate>
</telerik:GridTemplateColumn>
on code behind I am accessing it as
foreach (GridGroupFooterItem item in RadGrid.MasterTableView.GetItems(GridItemType.GroupFooter))
{
//set the colspan, so that the template cells are aligned with the grid columns
for (int i = 0; i <= item.Cells.Count - 1; i++)
{
(item.Cells[i] as TableCell).ColumnSpan = 1;
}
//color the footer labels based on the group index
//SetFooterLabelsColor(item);
}
foreach (GridGroupFooterItem item in OrderLineItemsRadGrid.MasterTableView.GetItems(GridItemType.GroupFooter))
{
//set the colspan, so that the template cells are aligned with the grid columns
for (int i = 0; i <= item.Cells.Count - 1; i++)
{
(item.Cells[i] as TableCell).ColumnSpan = 1;
}
}
thanks