I'm using a RadGrid with column filtering turned on. When I export data to Excel I always get an extra row at the top and bottom of the data that seems to be because of the filter row. It appears between the column headers and the data. Is there any way to hide this?
void Button1_Click(object sender, EventArgs e)
{
exporting = true;
RadGrid1.Rebind();
RadGrid1.MasterTableView.ExportToExcel();
}
void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
if (exporting && e.Item.ItemType == Telerik.Web.UI.GridItemType.FilteringItem)
{
e.Item.Visible = false;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With