我的数据网格填充数据很慢,滚动数据太慢 [英] My data grid is slow in filling data and too much slow in scroll data

查看:108
本文介绍了我的数据网格填充数据很慢,滚动数据太慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<DataGrid x:Name="GrdMaterials" AutoGenerateColumns="False" Width="1488" HorizontalAlignment="Left" VerticalAlignment="Stretch" Canvas.Left="2" Canvas.Top="10" FontFamily="Times New Roman" MaxHeight="462">

    <DataGrid.Columns>

        <DataGridTextColumn Header="Paper Category"  Width="100"  Binding="{Binding MatCat}"/>
        <DataGridTextColumn Header="Material ID"  Width="70"  Binding="{Binding MatId}"/>
        <DataGridTextColumn Header="Material Description"  Width="350"  Binding="{Binding MatDesc}"/>
        <DataGridTextColumn Header="w"  Width="70" Visibility="Hidden" Binding="{Binding Width}"/>
        <DataGridTextColumn Header="h"  Width="70" Visibility="Hidden" Binding="{Binding Height}"/>
        <DataGridTextColumn Header="Grammage"  Width="70"  Binding="{Binding MatGram}"/>
        <DataGridTextColumn Header="Last Purchase Price 1000SH" Width="150" Binding="{Binding MatLstPurPris1000Sh}"/>
        <DataGridTextColumn Header="Last Purchase Price 1000KG" Width="150" Binding="{Binding MatLstPurPris1000Kg}"/>
        <DataGridTextColumn Header="Market Price 1000SH" Width="120"  Binding="{Binding MatOldMarket1000Sh}"/>
        <DataGridTextColumn Header="Market Price 1000KG" Width="120"  Binding="{Binding MatOldMarket1000Kg}"/>
        <DataGridTextColumn Header="New Market Price 1000KG" Width="150" Binding="{Binding MatMarket}"/>
        <DataGridCheckBoxColumn Header="Update" Width="50" Binding="{Binding Check}"/>

    </DataGrid.Columns>

</DataGrid>





我的尝试:



更改名称绑定但滚动它的新内容很慢而且从未发生过我



What I have tried:

Change names binding but slow in scroll its new and never happens with me

推荐答案

当你有一个缓慢的填充和滚动它通常是因为你有太多,太多的数据:用户最多只能处理100行,如果你只是将整个数据库转储它们,你的应用程序永远不会被使用,因为它需要很长时间才能找到他们需要的行。



为您的数据提供页面,提供搜索和过滤选项,并一次显示20行。您的应用程序更快,响应更快,您的用户会更快乐。
When you have a slow "fill" and "scroll" it's normally because you have far, far too much data in it: users can only cope with maybe 100 row at most, and if you are just dumping your whole DB on them your app will never get used because it will take far too long to find the row they need.

Page your data, provide search and filter options, and present maybe 20 rows at a time. Your app with be faster and more responsive, and your users will be a lot happier.


这篇关于我的数据网格填充数据很慢,滚动数据太慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆