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

Printing...

3 Answers 111 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mike Graham
Top achievements
Rank 1
Mike Graham asked on 20 May 2010, 07:33 PM
I am trying to print a RadGridView control.

I followed the sample provided, creating a new control and I do see pages of data from my grid...  but here's the issue...

It seems like the good layout stuff must not be happening.  My alternating colors don't show up.  The text wrapping is not happening.  My columns are never resized to fit the width of the printed page.

My theory is that because my print grid is not part of the visual tree, it never gets the Loaded event where all of the good stuff must be happening.

Please help if you can :)
-Mike Graham

3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 21 May 2010, 01:08 PM
Hi Mike Graham,

Which exactly is the sample you are referring to? Is the one in our demos? Please provide us with more details about your project so that we can be more helpful. 
Furthermore, you are able to use as a reference our online documentation and this blog post

Regards,
Maya
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Mike Graham
Top achievements
Rank 1
answered on 21 May 2010, 04:11 PM
Hi - Thanks for the reply...

I used the download from this blog:
http://blogs.telerik.com/vladimirenchev/posts/09-12-28/how_to_easy_print_and_print_preview_with_radgridview_for_wpf.aspx

I modified the grid, setting these RadGridView Attributes:
                    AlternationCount="2"
                    AlternateRowBackground="Gainsboro"
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"

And added an attribute to my long text column:
                    TextWrapping="Wrap"

I get a grid when I print using the technique from the BLOG, but the alternating row colors are missing and the text is not wrapping...

Let me know if you need more to reproduce this and I'll make a small sample project...

Thanks again,
-Mike Graham
 



0
Maya
Telerik team
answered on 25 May 2010, 10:22 AM
Hello Mike Graham,

If you want to achieve wrapping, you need to set the property Width to either the grid, or the column containing the text, as the default value is set to infinity. In other words there is no explicit Width specified and the layout system lets it occupy as much horizontal space as it needs. You can use as a reference this forum thread.
As for the AlternateRowBackground, what do you mean by "alternating row colors are missing"? Is that property missing or just the colors do not appear? If it is the first case, please try to use the binaries from our latest version, as those used in the project of the blog are from a previous version.
I hope that helps.

 

Best wishes,
Maya
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Mike Graham
Top achievements
Rank 1
Answers by
Maya
Telerik team
Mike Graham
Top achievements
Rank 1
Share this question
or