Gridview和Repeater [英] Gridview and Repeater
本文介绍了Gridview和Repeater的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
哪个是 Gridview和Repeater 控件之间的更好选择?为什么?
which is the better choice between Gridview and Repeater control? and why?
推荐答案
与您的问题相同并回答:
http://stackoverflow.com/questions/4448588/which-control-should-i-use-repeater-or-gridview [ ^ ]
在这里你可以看出差异:
http://weblogs.asp.net/anasghanem/archive/2008/09/06/comparing-listview-with -gridview-datalist-and-repeater.aspx [ ^ ]
为了比较,请看:
哪种控件更好(gridview,datagrid,repeater等)? [ ^ ]
如果这样一个帮助你接受答案和投票。
Same question as yours and also answer:
http://stackoverflow.com/questions/4448588/which-control-should-i-use-repeater-or-gridview[^]
Here you can see difference:
http://weblogs.asp.net/anasghanem/archive/2008/09/06/comparing-listview-with-gridview-datalist-and-repeater.aspx[^]
And for comparison see this:
Which control is better(gridview,datagrid,repeater,etc)?[^]
If this one help to you pls accept as answer and vote.
这是开发人员的重要问题之一。一般来说,这取决于开发人员。但两者都有一些优势和劣势。
如果性能在时间和应用程序的重量方面是一个主要问题,那么Repeater总是更好的选择。
因为,
优势: Repeater获取一次数据源并重复绑定数据。
缺点:但是转发器没有设置分页。因此,为了设置分页,我们必须设置一个单独的控件或属性,通过它我们可以填充转发器的数据源。
但是对于网格视图:
缺点:重量很重。因此性能比转发器慢。
优势:但它有自己的分页属性。
现在这是我们的选择,我们希望在我们的应用程序中选择它们。
This is one of the important issue among developers. In general, It depends upon the developer. But both have some advantage as well as disadvantage.
If performance is a major issue in term of time and the weight of the application then Repeater is always better choice.
because,
Advantage: Repeater take its data source one time and bind data repetitively.
Disadvantage: But repeater does not set pagination . So to set pagination we have to set a separate control or property through which we can populate data source of the repeater.
But In case of Grid view :
Disadvantage: It is heavy weight . so performance is slow than repeater.
Advantage: But It has its own pagination property.
Now It is our choice, whom we want to select among them in our application.
两个控件都很好.. ..
这取决于你的需要...... :)
1)GridView很有用用于显示插入的数据并提供设施删除和更新..
2)Repeater控件用于显示绑定到控件的重复项目列表。 Repeater控件可以绑定到数据库表,XML文件或其他项目列表
Both controls are good ....
It depends on your need ....:)
1)GridView is useful for displaying your inserted data and provide facility delete and update it..
2)The Repeater control is used to display a repeated list of items that are bound to the control. The Repeater control may be bound to a database table, an XML file, or another list of items
这篇关于Gridview和Repeater的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文