Click here to Skip to main content
12,450,977 members (52,344 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: Silverlight4
The table of the datagrid is read from database by the way WCF RIA,and I just want to select several rows of the datagrid and delete them,but I found that when I selected one rows in the first page ,the rows at the same location of all the other page in the datagrid is selected!!!It's really a bad thing,so anyone could help???
And I also try to binding the check box with the Items ,but the others columns has not bool type.
<ScrollViewer Height="300">
                    <data:DataGrid Name="dataGrid1" Width="Auto" IsReadOnly="True"  ItemsSource="{Binding Data, ElementName=employeeDataSource}" AutoGenerateColumns="False" LoadingRow="ResultsGrid_LoadingRow" VerticalScrollBarVisibility="Disabled">
 
                        <data:DataGridTemplateColumn Header="select">
                            <data:DataGridTemplateColumn.CellTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal">
                                        <CheckBox x:Name="ck" Content=""  Tag="{Binding}"></CheckBox>
                                    </StackPanel>
                                </DataTemplate>
                            </data:DataGridTemplateColumn.CellTemplate>
                            </data:DataGridTemplateColumn>

And I use the DataPager to paging the datagrid.
Posted 18-Nov-12 20:49pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160826.1 | Last Updated 19 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100