Data Grid Shows extra column

Posted by cre-johnny07 on Stack Overflow See other posts from Stack Overflow or by cre-johnny07
Published on 2010-05-19T10:22:51Z Indexed on 2010/05/19 10:30 UTC
Read the original article Hit count: 204

Filed under:
|

I have a wpf data Grid where I created twlo columns. But whenever I run the window the datagrid shows a extra column. I can't figure out why.? Below is my code

 <Custom:DataGrid
                             Background="White"
                             AlternatingRowBackground="#103D7EC5"       
                             RowHeaderWidth="20" 
                             SelectionMode="Single"  
                             SelectionUnit="FullRow" 
                             GridLinesVisibility="None"                          
                             MinRowHeight="30"    
                             EnableRowVirtualization="True"
                             EnableColumnVirtualization="True"
                             CanUserAddRows="False"
                             CanUserSortColumns="True"
                             AreRowDetailsFrozen="True"
                             RowDetailsVisibilityMode="Collapsed"
                             ItemsSource="{Binding CurrentEntity.RefDetails, Mode = TwoWay}" AutoGenerateColumns="False" Name="grdDoctor1" ScrollViewer.VerticalScrollBarVisibility="Auto" MaxHeight="200">
                                <Custom:DataGrid.RowDetailsTemplate>
                                    <DataTemplate>
                                    </DataTemplate>
                                </Custom:DataGrid.RowDetailsTemplate>

                                <Custom:DataGrid.Columns>
                                <Custom:DataGridTextColumn Binding="{Binding DepId}" Width="100" IsReadOnly="True" Header="Id"/>
                                <Custom:DataGridTextColumn Binding="{Binding DepData}" Width="100" IsReadOnly="False" Header="Data"/>
                            </Custom:DataGrid.Columns>

                    </Custom:DataGrid>

Any suggestion why this is happening..?

alt text

© Stack Overflow or respective owner

Related posts about wpf

Related posts about datagrid