gridview PrintAndExportWithRadDocument

12 posts, 0 answers
  1. Luis
    Luis avatar
    29 posts
    Member since:
    Dec 2013

    Posted 27 May 2014 Link to this post

    good morning;

    I need help to export data from gridview but have too many columns and the export file looks like attachment.
    I used the classes of this example  http://demos.telerik.com/silverlight/#GridView/PrintAndExportWithRadDocument
    I wanna export in horizontal and use two or more pages for better data presentation. how can do that?

    thanks have a nice day.
  2. Boris
    Admin
    Boris avatar
    276 posts

    Posted 30 May 2014 Link to this post

    Hello Luis,

    There are several options you can pursue:
    • Export in a Landscape orientation or with larger PageSize of the Sections.
    • If you still need to split the number of columns per page for example 10 columns to display in the first page and next 20 on another, you will need to implement custom logic as this is not supported out of the box. 
    • Have you considered using our Reporting product which provides advanced printing capabilities?

    I hope this helps.

    Regards,
    Boris Penev
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. DevCraft banner
  4. Luis
    Luis avatar
    29 posts
    Member since:
    Dec 2013

    Posted 05 Jun 2014 Link to this post

    ok,I done that, but how I do for hierarchical gridview, do you have a example project or demo for print and export a hierarchical gridview? with the same code does not print the child rows.
  5. Boris
    Admin
    Boris avatar
    276 posts

    Posted 09 Jun 2014 Link to this post

    Hello Luis,

    For a practical example on how to export RowDetails you can check our ExportingRowDetails Silverlight demo. You will need to combine it with the PrintAndExportWithRadDocument printing demo.

    I am suggesting this demo because RowDetails is the recommended approach for displaying hierarchical data in GridView

    I hope this helps.

    Regards,
    Boris Penev
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  6. Luis
    Luis avatar
    29 posts
    Member since:
    Dec 2013

    Posted 20 Jun 2014 Link to this post

    there a way to perform the export in the background, without use the ui thread?
    because with this method the user interface is blocked until the export is done, and busyindicator is frozen.
  7. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 23 Jun 2014 Link to this post

    Hello,

    You can export data with RadSpreadProcessing. The model is completely independent from UI. You can check this online demo as an example on how to export data.

    How does it meet your needs?

    Regards,
    Didie
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  8. Luis
    Luis avatar
    29 posts
    Member since:
    Dec 2013

    Posted 26 Jun 2014 Link to this post

    how export to word with RadSpreadProcessing? i can't find the wordprovider.
    in the example not exported to word
  9. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 26 Jun 2014 Link to this post

    Hello,

    I am afraid you cannot export to Word with RadSpreadProcessing. In Silverlight, you can export to .docx with RadDocument. Please check the Print and Export with RadDocument online demo for an example.

    Regards,
    Didie
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  10. Luis
    Luis avatar
    29 posts
    Member since:
    Dec 2013

    Posted 01 Jul 2014 Link to this post

    I need use commands to leave aside the ui thread? I use the logical with a class instance but the UI still freezing
  11. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 02 Jul 2014 Link to this post

    Hi,

    When you are using an instance of RadGridView to create a document, you need the UI Thread because of the UI control (RadGridView).
     
    In case, you do not need access to UI elements, you can create the document in a different thread similar to:
    RadDocument doc = new RadDocument();
    var thread = new Thread(() =>
    {
        PdfFormatProvider provider = new PdfFormatProvider();
        HtmlFormatProvider htmlProvider = new HtmlFormatProvider(); 
     
        doc = htmlProvider.Import(someHtml);                       
        buffer = provider.Export(doc);
    });
    thread.SetApartmentState(ApartmentState.STA);
    thread.Start();
    thread.Join();

    Regarding the export itself (RadGridView.Export()), I can suggest you checking the Async Export documentation.

    Regards,
    Didie
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  12. Luis
    Luis avatar
    29 posts
    Member since:
    Dec 2013

    Posted 14 Jul 2014 Link to this post

    how can I get the width of the raddocument for determine the number of columns can I put in it? some property or method
  13. Petya
    Admin
    Petya avatar
    975 posts

    Posted 16 Jul 2014 Link to this post

    Hello Luis,

    You can obtain the width on a per-section basis using the following code:
    double availableWidth = this.radRichTextBox.Document.Sections.First.PageSize.Width;

    I hope this helps.

    Regards,
    Petya
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top
DevCraft banner