Click here to Skip to main content
Rate this: bad
good
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
0 Sergey Alexandrovich Kryukov 359
1 Richard MacCutchan 310
2 OriginalGriff 290
3 Sharmanuj 146
4 Jared Sanow 145
0 Sergey Alexandrovich Kryukov 5,969
1 OriginalGriff 5,005
2 CPallini 2,473
3 Richard MacCutchan 1,547
4 Abhinav S 1,507


Advertise | Privacy | Mobile
Web04 | 2.8.140814.1 | Last Updated 19 Nov 2012
Copyright © CodeProject, 1999-2014
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