why is that we always get an extra column show in datagrid

Posted by prince23 on Stack Overflow See other posts from Stack Overflow or by prince23
Published on 2010-05-14T09:55:41Z Indexed on 2010/05/14 11:14 UTC
Read the original article Hit count: 177

hi,

i have four columns specfied but why is that i always see one extra column shown in the output

this is my xaml code

 <Grid x:Name="LayoutRoot" Background="White" Height="492" Width="453">
        <sdk:DataGrid MinHeight="100" x:Name="dgCounty" AutoGenerateColumns="False" VerticalAlignment="Top" Grid.Row="1"   IsReadOnly="True"  Margin="5,5,5,0" RowDetailsVisibilityChanged="dgCounty_RowDetailsVisibilityChanged"  SelectionMode="Extended"   RowDetailsVisibilityMode="VisibleWhenSelected">
            <sdk:DataGrid.Columns>
                <sdk:DataGridTemplateColumn>
                    <sdk:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Button x:Name="myButton" Width="24" Height="24" Click="Details_Click">
                                <Image  x:Name="img" Source="Images/detail.JPG" Stretch="None"/>
                            </Button>
                        </DataTemplate>
                    </sdk:DataGridTemplateColumn.CellTemplate>
                </sdk:DataGridTemplateColumn>
                <sdk:DataGridTemplateColumn  Header="ID">
                    <sdk:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate >
                                <sdk:Label Content="{Binding EmployeeID}" />
                        </DataTemplate>
                    </sdk:DataGridTemplateColumn.CellTemplate>
                </sdk:DataGridTemplateColumn>
                <sdk:DataGridTemplateColumn  Header="Name">
                    <sdk:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate >
                            <sdk:Label Content="{Binding EmployeeFName}" />
                        </DataTemplate>
                    </sdk:DataGridTemplateColumn.CellTemplate>
                </sdk:DataGridTemplateColumn>
                <sdk:DataGridTemplateColumn  Header="MailID">
                    <sdk:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate >
                            <sdk:Label Content="{Binding EmployeeMailID}" />
                        </DataTemplate>
                    </sdk:DataGridTemplateColumn.CellTemplate>
                </sdk:DataGridTemplateColumn>
            </sdk:DataGrid.Columns>

 </sdk:DataGrid>

is there any setting that we need to do to remove that extra column?

thanks in advance for the help.

© Stack Overflow or respective owner

Related posts about silverlight-4.0

Related posts about Silverlight