一个DataGrid和ASP.NET的GridView之间的区别? [英] The Difference Between a DataGrid and a GridView in ASP.NET?
问题描述
我已经做ASP.NET开发了一小会儿,现在,我用两个GridView和DataGrid的控件之前的各种事情,但我从来没有能找到一个很好的理由使用一个或其他。我想知道:
I've been doing ASP.NET development for a little while now, and I've used both the GridView and the DataGrid controls before for various things, but I never could find a really good reason to use one or the other. I'd like to know:
什么是这两个ASP.NET控件之间的区别?什么是两者的优点还是缺点?一个得更快?较新的?易于维护?
What is the difference between these 2 ASP.NET controls? What are the advantages or disadvantages of both? Is one any faster? Newer? Easier to maintain?
对于控制的智能感知总结似乎并不来形容两者之间的差异。他们都可以在运行时查看,编辑和整理数据,并自动生成列。
The intellisense summary for the controls doesn't seem to describe any difference between the two. They both can view, edit, and sort data and automatically generate columns at runtime.
编辑: Visual Studio 2008中不再列出的DataGrid在工具箱中可用的控制。它仍然是可用(传统支持我假设)如果你的手,虽然输入。
Visual Studio 2008 no longer lists DataGrid as an available control in the toolbox. It is still available (for legacy support I assume) if you type it in by hand though.
推荐答案
的DataGrid是一个ASP.NET 1.1的控制,仍然支持。 GridView控件到达2.0,取得了一定的任务更简单添加不同的数据绑定功能:
DataGrid was an ASP.NET 1.1 control, still supported. GridView arrived in 2.0, made certain tasks simpler added different databinding features:
该链接有DataGrid和GridView控件功能的比较 -
This link has a comparison of DataGrid and GridView features -
https://msdn.microsoft.com /en-us/library/05yye6k9(v=vs.100).aspx
这篇关于一个DataGrid和ASP.NET的GridView之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!