views:

44

answers:

1

Initially I am populating 100 rows in Data grid, when user scroll the grid rows, I want to populate another 100 rows. I am using wpf data grid, I have not found any event of data grid that I can catch to accomplish this task. Then I have used scroll viewer control and try to catch change event where I know that my scroll viewer reach at end, then I will load another rows in data grid.

 <ScrollViewer Name="svDataGrid" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" ScrollChanged="ScrollViewer_ScrollChanged" >
            <DataGrid VerticalScrollBarVisibility="Disabled"   Background="Transparent" Visibility="Collapsed" Name="dgList" Grid.Row="1" IsSynchronizedWithCurrentItem="True"
                 AutoGenerateColumns="False" AlternatingRowBackground="Azure"
                 CanUserAddRows="False" CanUserDeleteRows="False"
                 CanUserSortColumns="True" CanUserReorderColumns="False"
                 CanUserResizeColumns="True" CanUserResizeRows="False" IsReadOnly="True" MouseDoubleClick="dgList_MouseDoubleClick"  PreviewKeyDown="dgList_PreviewKeyDown">
            </DataGrid>
        </ScrollViewer>

any suggestion or hint appreciated.

Thanks

+1  A: 

You should be looking at data virtulization.

Please refer http://bea.stollnitz.com/blog/?p=344

bjoshi