Current filter:
                                You should refresh the page.
                                Support Center
                                  • Hello,

                                    I've defined a grid column header in the following way:

                                    <dxg:GridColumn.Header> <Image Source="/Images/16x16/document.png" Stretch="None" /> </dxg:GridColumn.Header>
                                    The problem is, that it doesn't print the header (instead, it prints 'System.Byte[]') when printing or previewing the print.

                                    Also, I can't print a column that has its content defined via a converter. I've tried a ton of samples provided in the support center and documentation, but I can't print a column that's defined like that:
                                    <dxg:GridColumn.CellTemplate> <DataTemplate DataType="dxg:CellValueEventArgs"> <Image Width="16" Height="16" Source="{Binding Path=Value, Converter={cv:ImageConverter}}" /> </DataTemplate> </dxg:GridColumn.CellTemplate>
                                    And the converter returns:
                                    return new Uri("/Images/16x16/mail-reply.png", UriKind.Relative);
                                    How can I solve that?

                                1 Solution

                                Creation Date Rating Importance Sort by


                                The Header and CellStyle properties are not applied in printing. For custom printing of the GridControl, it is necessary to use the PrintColumnHeaderStyle and PrintCellStyle properties.
                                Feel free to contact us if you need additional information.


                                • Ryan Mills 05.20.2013

                                  Thanks for your answer! But this (for a static header) doesn't work:

                                                                                   <Style TargetType="{x:Type Image}">
                                                                                       <Setter Property="Source" Value="/Images/16x16/document.png" />

                                  Can you please also show a sample for a CellStyle used for printing, that gets its value from a converteR?

                                • Hello Ryan,
                                  To print an image within the grid column header, I suggest you use the following PrintColumnHeaderStyle:

                                  xmlns:dxe="" xmlns:dxp="" ... <dxg:GridColumn.PrintColumnHeaderStyle> <Style TargetType="dxe:TextEdit"> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <Image Source="..."/> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="dxp:ExportSettings.TargetType" Value="Image"/> </Style> </dxg:GridColumn.PrintColumnHeaderStyle>
                                  As for the question about the PrintCellStyle, I suggest you review the following articles:
                                  1) How to customize the DXGrid printing appearance;
                                  2) How to use the PrintCellStyle property to customize cell's printing appearance.
                                  Feel free to contact us if you need further clarification.

                                • Ryan Mills 05.21.2013

                                  Thanks, this has really helped me!

                                • You're welcome, Ryan!

                                If you need additional product information, write to us at or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2017 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners