or
int RowCount;
protected void RadGrid1_ItemEvent(object sender, GridItemEventArgs e)
{
if (e.EventInfo is GridInitializePagerItem)
{
RowCount = (e.EventInfo as GridInitializePagerItem).PagingManager.DataSourceCount;
}
}
protected void grd_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridFooterItem) //Set footer text
{
RadGrid grd = (RadGrid)sender;
GridFooterItem footerItem = e.Item as GridFooterItem;
footerItem["LastCol"].Text = "Count: " + RowCount.ToString();
}
}
However, when I export the grid to the Excel, the count is show as 0 in excel file (Count: 0).
Is there any workaround on this issue?
Thanks
Lamk.
| <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="TestRad._Default" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" > |
| <head runat="server"> |
| <title></title> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <div> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server" |
| OutputCompression="AutoDetect"> |
| </telerik:RadScriptManager> |
| <telerik:RadWindowManager ID="RadWindowManager1" runat="server"> |
| <Windows> |
| <telerik:RadWindow runat="server" VisibleOnPageLoad="true" Visible="true" Behavior="Maximize, Minimize, Pin" InitialBehavior="Pin" NavigateUrl="WebForm1.aspx"></telerik:RadWindow> |
| </Windows> |
| </telerik:RadWindowManager> |
| </div> |
| </form> |
| </body> |
| </html> |
| <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="TestRad.WebForm1" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" > |
| <head runat="server"> |
| <title></title> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <div> |
| hello world |
| </div> |
| </form> |
| </body> |
| </html> |
<telerik:RadHtmlChart ID="CHT_samples" runat="server"></telerik:RadHtmlChart>AxisItem o_xItem = new AxisItem();i_gridLines =9;for (i_incrementA = 0; i_incrementA < i_gridLines; i_incrementA++){ // Add the mold number as the X label o_xItem = new AxisItem(); o_xItem.LabelText = "#" + o_sampling.LST_MOLDS[i_incrementA].NUM; CHT_SAMPLESCHART.PlotArea.XAxis.Items.Add(o_xItem);}LineSeries o_xMax = new LineSeries(); o_xMax.Name = "Max";CHT_SAMPLESCHART.PlotArea.Series.Add(o_xMax);CHT_SAMPLESCHART.PlotArea.Series[0].Items.Add(16.85m);<telerik:GridTemplateColumn HeaderText="Product No." UniqueName="lnkproductnumber" DataType="System.String"- SortExpression="vchproductno" DataField="vchproductno" ReadOnly="true" ShowFilterIcon="false" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true"> <ItemTemplate> <asp:LinkButton ID="lnkProdNo" runat="server" Text='<%# Eval( "vchproductno" ) %>' Font-Bold="true" OnCommand="GetProductDetail" CommandName='<%# Eval( "vchproductno" ) %>' CommandArgument='<%# Eval( "intproductid" ) %>'> </asp:LinkButton> </ItemTemplate> </EditItemTemplate> <HeaderStyle Width="100px" /> <ItemStyle Width="100px" /> </telerik:GridTemplateColumn>
