Data Grid Shows extra column
- by cre-johnny07
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..?