Hi,
I used following code to get the total item count to display on the footer:
I used following code to get the total item count to display on the footer:
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.