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

Grid Export to PDF without a border

3 Answers 69 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Emre
Top achievements
Rank 1
Emre asked on 15 Dec 2011, 09:33 PM
I have a grid with edit and delete buttons.When I export grid to pdf,edit and delete columns are exported too.Is there a way to remove edit and delete columns when exporting the grid to pdf?

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 16 Dec 2011, 05:16 AM
Hello Emre,

Try setting the following.
aspx:
<ExportSettings ExportOnlyData="true" OpenInNewWindow="true" IgnorePaging="true">
</ExportSettings>

-Shinu.
0
Emre
Top achievements
Rank 1
answered on 16 Dec 2011, 09:01 AM
hi shinu,

I've tried this approach,but still same problem exists.
0
Shinu
Top achievements
Rank 2
answered on 19 Dec 2011, 07:19 AM
Hello,

Try the following code snippet.
CS:
protected void btn_Click(object sender, EventArgs e)
  {
      grid1.MasterTableView.GetColumn("Editcol").Visible = false; //to hide Edit column from PDF
      grid1.MasterTableView.GetColumn("deletecol").Visible = false; //to hide Delete column from PDF
      grid1.MasterTableView.ExportToPdf();
  }

-Shinu.
Tags
Grid
Asked by
Emre
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Emre
Top achievements
Rank 1
Share this question
or