WPF DATAGRID EXTRA COLUMN IN HEADER ON LEFT

Mark Devid

Total Post:102

Points:714
Posted by  Mark Devid
WPF 
WPF
 2572  View(s)
Ratings:
Rate this:

I keep getting this button in the header, I can click on the button to select all rows. This misaligns the data from the header. Any ideas? Thanks in Advance.

<dg:DataGrid.Columns>

    <dg:DataGridTextColumn Header="Description" Width=".5*"

                           Binding="{Binding Description}">

    </dg:DataGridTextColumn>

    <dg:DataGridTextColumn Header="Type" Width="100" Binding="{Binding Type}">

    </dg:DataGridTextColumn>

    <dg:DataGridTextColumn Header="Amount $" Width="100" Binding="{Binding Amount}">

    </dg:DataGridTextColumn>

    <dg:DataGridTextColumn Header="Effective From Date" Width="100" Binding="{Binding EffectiveFromDate}"

                           IsReadOnly="True">

    </dg:DataGridTextColumn>

    <dg:DataGridTextColumn Header="Effective To Date" Width="100" Binding="{Binding EffectiveToDate}"

                           IsReadOnly="True">

    </dg:DataGridTextColumn>

    <dg:DataGridTextColumn Header="Status" Width="100" Binding="{Binding Status}">

    </dg:DataGridTextColumn>

</dg:DataGrid.Columns>

  1. Sumit Kesarwani

    Post:378

    Points:2694
    Re: wpf datagrid extra column in header on left

    Hi Mark,


    I am sure you have figured this out by now but try setting this Property in your data grid.

    HeadersVisibility="Column"

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!