Gridview的Databind非常慢 [英] Gridview Databind Very Slow

查看:226
本文介绍了Gridview的Databind非常慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Am使用asp.net gridview少量的数据加载到网格不是问题,但是大量的数据加载到网格却遇到了速度问题.如何避免?

Am Using asp.net gridview small amount of data load to grid is not a problem but bulk amount of data load to grid i facing slowness issue. how to avoid ?

我正在使用sqldataadapter并填充到datatable并绑定到gridview

and i am using sqldataadapter and fill to datatable and bind to gridview

推荐答案

我在返回约9000行的数据源访问存储过程时遇到了这个问题. sproc运行速度很快,但是在将数据绑定到gridview时运行速度会很慢.

I had this problem returning about 9000 rows with a datasource accessing a stored procedure. The sproc runs fast, but would run slow when it was databound to a gridview.

我删除了存储过程中的order by子句,它的显示速度很快.显然,网格希望自己进行排序.

I removed the order by clause in the stored procedure and it's lighting fast. Eveidently the grid wants to do it's own ordering.

这篇关于Gridview的Databind非常慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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