Export to PDF, CSV etc

5 posts, 0 answers
  1. Kalyani
    Kalyani avatar
    20 posts
    Member since:
    Jul 2011

    Posted 17 Mar 2014 Link to this post

    I have a rad pivot grid and I am trying to export the grid to pdf and csv.  I am able to export it to excel.   Is there a work around to get it exported to other formats.  Would appreciate any suggestions you might have.

    I tried this for .csv  but I am unable to get any data.  

    protected void btnExportCSV_Click(object sender, EventArgs e)
     {
      Response.Clear();
      Response.Buffer = true;
      Response.AddHeader("content-disposition",
       "attachment;filename=GridViewExport.csv");
      Response.Charset = "";
      Response.ContentType = "application/text";

      RadPivotGrid1.AllowPaging = false;
      RadPivotGrid1.DataBind();

      StringBuilder sb = new StringBuilder();
      for (int i = 0; i < RadPivotGrid1.Fields.Count; i++)
      {   
        //add separator
       sb.Append(RadPivotGrid1.Fields[i].ToString() + ',');
       }
       //append new line
       sb.Append("\r\n");
       lblTest.Text = sb.ToString();
      Response.Output.Write(sb.ToString());
      Response.Flush();
      Response.End();
     }

    I think I am not doing this right?  What is the best way to loop through the cells in a pivot grid and get data.  
      for (int i = 0; i < RadPivotGrid1.Fields.Count; i++)
      {   
        //add separator
       sb.Append(RadPivotGrid1.Fields[i].ToString() + ',');
       }

    Thanks
  2. Kostadin
    Admin
    Kostadin avatar
    1711 posts

    Posted 20 Mar 2014 Link to this post

    Hi Kalyani,

    I am afraid that RadPivotGrid could be exported only to Excel at the moment.

    Regards,
    Kostadin
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. nagaraju
    nagaraju avatar
    2 posts
    Member since:
    Feb 2015

    Posted 16 Feb 2015 Link to this post

    Hi Kostadin,

    when we can expect RadPivotGrid Exporting to PDF.

    Thank you
  5. Kostadin
    Admin
    Kostadin avatar
    1711 posts

    Posted 18 Feb 2015 Link to this post

    Hello Nagaraju,

    I am afraid I can not provide you with a specific time frame but if export to PDF is available it will be announced in Telerik web site.

    Regards,
    Kostadin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. nagaraju
    nagaraju avatar
    2 posts
    Member since:
    Feb 2015

    Posted 09 Jul 2015 in reply to Kostadin Link to this post

     

    Thank you Kostadin  :)

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017