Printing...

4 posts, 0 answers
  1. Mike Graham
    Mike Graham avatar
    29 posts
    Member since:
    May 2010

    Posted 20 May 2010 Link to this post

    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
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 21 May 2010 Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Mike Graham
    Mike Graham avatar
    29 posts
    Member since:
    May 2010

    Posted 21 May 2010 Link to this post

    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
     



  5. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 25 May 2010 Link to this post

    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.
Back to Top