This is a migrated thread and some comments may be shown as answers.

Filtering Column text is also exporting in PDF and Excel

1 Answer 71 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Naresh
Top achievements
Rank 2
Naresh asked on 24 May 2011, 11:48 AM
Hi,

I have searched some data using filtering column then export grid as PDF and excel format.
The filtering text also exported to pdf and excel.
Give me the solution ASAP. It's urgent.

Thank you,
Nagarajan

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 24 May 2011, 01:34 PM
Hello Nagarajan,

 You can achieve this by hiding the FilterRow before exporting. Try the following code snippet. Hope this helps you.

C#:
protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
  {
     if (e.CommandName == RadGrid.ExportToPdfCommandName)
    {
      foreach (GridFilteringItem filter in RadGrid1.MasterTableView.GetItems(GridItemType.FilteringItem))
        {
            filter.Visible = false;
        }
           RadGrid1.MasterTableView.ExportToPdf();
       }
   }

Thanks,
Princy.
Tags
Grid
Asked by
Naresh
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Share this question
or