tags:

views:

554

answers:

3

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.

Datagrid image via link:

http://picasaweb.google.com/lh/photo/CahvlINknhL5ykIW2zCfIw?feat=directlink

<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>

A: 

That's odd. If I just take your code and paste into an empty DataGrid element, I don't get that behavior.

What does your DataGrid element definition look like?

Also, what version of the WPF Toolkit are you using?

Oskar
xmlns:dg="schemas.microsoft.com/wpf/2008/WPFToolKit Version: 3.5.40128.1 Odd, that excatly what I thought at first but now its just really annoying... I don't get it!! thanks for the help
I am seeing the same thing in the Feb 2010 toolkit and the previous version.
Jonathan Allen
+2  A: 

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

HeadersVisibility="Column"

Nathan
@Nathan -- That was superb solution. It solved my problem of extra column on left in datagrid.. Great job!!!!!!!!
Guru Charan
A: 

thank you so much Nathan. I was struggling for this problem since last few day.... thanks again....

VK