title: In C# winforms using telerik assembly references how to export radGridView to pdf ( Im not using MCV or WPF, implementing in normal winforms)
body: <pre><code>    using Telerik.WinControls.Data;
      using Telerik.WinControls.UI.Export;
  
    namespace Directory
    {
    public partial class radForm : Form
    {
      public radForm()
      {
          InitializeComponent();
      }
  
      private void radForm_Load(object sender, EventArgs e)
      {
  </code></pre>
  
  <p>// TODO: This line of code loads data into the 'directoryDataSet.DirDetails' table. You can move, or remove it, as needed.</p>
  
  <pre><code>        this.dirDetailsTableAdapter.Fill(this.directoryDataSet.DirDetails);
  
      }
  </code></pre>
  
  <p>// Button click         </p>
  
  <pre><code>    private void button1_Click(object sender, EventArgs e)
      {
          ExportToPDF exporter = new ExportToPDF(this.radGridView1);
  </code></pre>
  
  <p>//The FileExtension property allows you to change the default (*.pdf) file extension of the exported file</p>
  
  <pre><code>        exporter.FileExtension = "pdf"; 
  
          exporter.HiddenColumnOption = Telerik.WinControls.UI.Export.HiddenOption.DoNotExport;
  </code></pre>
  
  <p>// This to make the grid fits to the PDF page width</p>
  
  <pre><code>        exporter.FitToPageWidth = true;
  </code></pre>
  
  <p>// Exporting data to PDF is done through the RunExport method of ExportToPDF object</p>
  
  <pre><code>        string fileName = "c:\\Directory-information.pdf";
          exporter.RunExport(fileName);
  
  
       }
  
  
    }
  }
  </code></pre>
  
  <p>Some how Im missing something here and my gridview isn't exporting into pdf and no file creation takes place.</p>