找回密码
 立即注册

QQ登录

只需一步,快速开始

sunyuanze

注册会员

21

主题

66

帖子

169

积分

注册会员

积分
169

活字格认证微信认证勋章

sunyuanze
注册会员   /  发表于:2015-2-4 22:31  /   查看:4119  /  回复:1
C1FlexGrid的header排序时性能问题:
C1FlexGrid用如下方法绑定数据源
grid.DataSource = BindingList<Entity>

当数据达到几千条的时候,点击header排序就没有响应了。
请问如何设置能提高性能?

1 个回复

倒序浏览
Alice
社区贡献组   /  发表于:2015-2-5 10:53:00
沙发
回复 1楼sunyuanze的帖子

你的问题没有重现。
如果grid绑定到DataTable的时候,可以通过使用sort属性来排序增强性能。
  1. private void Form1_Load(object sender, System.EventArgs e)
  2. {
  3.     this.productsTableAdapter.Fill(this.nwindDataSet.Products);
  4. }

  5. private void btn_Sort_Click(object sender, EventArgs e)
  6. {
  7.     // Sort the data by the UnitsInStock column then by the ProductID column.
  8.     this.productsBindingSource.Sort = &quot;UnitsInStock ASC, ProductID ASC&quot;;
  9. }

  10. private void btn_ClearSort_Click(object sender, EventArgs e)
  11. {
  12.     // Clear the sort.
  13.     this.productsBindingSource.Sort = &quot;&quot;;
  14. }
复制代码


请参考文档的第7条,tip7.
http://helpcentral.componentone. ... dforwinformst2.html
请点击评分,对我的服务做出评价!  5分为非常满意!

葡萄城控件服务团队

官方网站: http://www.gcpowertools.com.cn
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部