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

Observing filters in PDF export

4 Answers 57 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kjell
Top achievements
Rank 1
Kjell asked on 30 Nov 2010, 07:34 PM
When exporting to word/excel or even printing a gridview, we can respect any filtering the user has done, is it possible to do the same thing with the PDF export?  I am using code similar to this example:

http://blogs.telerik.com/vladimirenchev/posts/10-11-11/pdf_export_with_radgridview_for_silverlight_q3_2010.aspx

The only thing I can think of is if there is a way to tell programatically that a row is filtered out or displayed.  Right now I am actually going straight to the datapager, so I know I will need to change that but just looking for a little guidance.  Thanks in advance!

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 01 Dec 2010, 08:06 AM
Hi,

 Since this approach is using Items collection will work properly when the grid is filtered. 

Kind regards,
Vlad
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Kjell
Top achievements
Rank 1
answered on 02 Dec 2010, 06:26 PM
Thanks, using items with pagesize=0 did the trick.  

Got another one on the PDF export, how do I get rid of the table border?
0
Ivailo Karamanolev
Telerik team
answered on 07 Dec 2010, 01:28 PM
Hello Kjell,

Here's some code which walks through all the tables in a document and removesthe borders. You can extract parts of it if you need a more specific functionality.
foreach (Table table in document.EnumerateChildrenOfType<Table>())
{
    foreach (TableRow row in table.Rows)
    {
        foreach (TableCell cell in row.Cells)
        {
            cell.Borders.All = new Telerik.Windows.Documents.Model.Border(BorderStyle.None, Colors.Black);
        }
    }
}

Best wishes,
Ivailo
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Kjell
Top achievements
Rank 1
answered on 07 Dec 2010, 11:17 PM
Thank you, that is exactly what I was looking for.  Keep up the good work.
Tags
GridView
Asked by
Kjell
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Kjell
Top achievements
Rank 1
Ivailo Karamanolev
Telerik team
Share this question
or