This project is read-only.

Header data template

Dec 23, 2012 at 12:24 PM

Hi

I was trying to set the column header to an image instead of text

But no matter what i set in the column header data template it ignores it

Any idea why it happens or any workaround?

Thank you

Feb 2, 2013 at 2:33 PM
Hi,

If you do that than you will loose auto filter and row summaries. Hard way would be to go in the extendeddatagrid project and replace text with image you want.

Regards,
bpoojary
Nov 16, 2013 at 7:10 PM
Hi,

Yes its possible

Try this
<ExtendedColumn:ExtendedDataGridCheckBoxColumn Binding="{Binding Check}" IsThreeState="True" Width="50">
                <ExtendedColumn:ExtendedDataGridCheckBoxColumn.HeaderStyle>
                    <!-- Local Style for header of first DataGrid column. -->
                        <Style TargetType="Primitives:DataGridColumnHeader">
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type Primitives:DataGridColumnHeader}">
                                        <Image Source="whatever.png"/>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                        </Style>
                </ExtendedColumn:ExtendedDataGridCheckBoxColumn.HeaderStyle>
            </ExtendedColumn:ExtendedDataGridCheckBoxColumn>