Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am load min 2000 record in datagrid in wpf and i use ScrollViewer.CanContentScroll="False" this property that time record get 4 to 5 min to load in a dategrid what was the main reason behind us

if i remove this field than he load quickly this record

XML
<DataGrid x:Name="GRD_PROD" HorizontalAlignment="Left" Margin="0,53,0,0" VerticalAlignment="Top" Height="427" Width="890" ItemsSource="{Binding}" AutoGenerateColumns="False"  IsEnabled="True" TabIndex="3"    >
            <DataGrid.Columns>
                <DataGridTemplateColumn Header="Pass Date" Width="82">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Label   Content ="{Binding  APASSDT}"  BorderThickness="0"    IsEnabled="False"    />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                    <DataGridTemplateColumn.CellEditingTemplate  >
                        <DataTemplate>
                            <DatePicker SelectedDate="{Binding APASSDT}" DisplayDateStart="{Binding APASSDT}"    BorderThickness="0" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellEditingTemplate>
                </DataGridTemplateColumn>
                <DataGridTextColumn Header="Vou. Date" Width="82"  Binding="{Binding AVOUDT}" IsReadOnly ="False" />
                <DataGridTextColumn Header="DOC" Width="30" Binding="{Binding ADOCTP}" IsReadOnly ="False"    />
                <DataGridTextColumn Header="Vou.No." Width="60" Binding="{Binding AVOUNO}" IsReadOnly ="False"/>
                <DataGridTextColumn Header="Particulars" Width="290" Binding="{Binding ANAR}" IsReadOnly ="False" />
                <DataGridTextColumn Header="Cheque No." Width="100" Binding="{Binding ACHQNO}" IsReadOnly ="False"></DataGridTextColumn>
                <DataGridTextColumn Header="Cheque Dt." Width="80" Binding="{Binding ACHQDT}" IsReadOnly ="False"/>
                <DataGridTextColumn Header="Debit Amt." Width="80" Binding="{Binding ADEBTAMT}" IsReadOnly ="False"/>
                <DataGridTextColumn Header="Credit Amt." Width="80" Binding="{Binding ACRDTAMT}" IsReadOnly ="False" />
                <DataGridTextColumn Visibility="Hidden"  Header="Credit Amt." Width="80" Binding="{Binding ACCODE}" IsReadOnly ="False" />
            </DataGrid.Columns>
        </DataGrid>
Posted
Updated 29-Sep-14 20:47pm
v2
Comments
Richard MacCutchan 30-Sep-14 3:50am    
And do you really expect your users to scroll through 2000 records to find the one they want? Use some proper filtering and paging processes to speed up your data access.
manoj s sherje 30-Sep-14 8:18am    
actually sir i am show bank related data for the particular month i have need to show record for particular date if without using this prop. ScrollViewer.CanContentScroll="False" this record show within second but if i scroll grid data refresh the grid
mudit_malhotra 30-Sep-14 10:17am    
are you doing virtualization in your grid ?
manoj s sherje 2-Oct-14 4:40am    
yes
mudit_malhotra 6-May-15 10:33am    
what is parent to your grid? if its a stack panel, that's no good

1 solution

i have met the same questions ,
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900