.netasp.netlistviewgridview

ASP.NET Grid View vs. List View


What are the advantages of using listview over gridview? I need pagination, editing rows, inserting rows, and deleting rows in my view. Which control is best for that? It seems like GridView does not support data pager. What would I sacrifice if I migrated my gridviews to listviews?


Solution

  • GridView supports:

    ListView supports:

    The reason to use ListView would be if you need some special layout, for example, to create a table that places more than one item in the same row, or to break free from table-based rendering altogether) - which is not possible with GridView.

    Using GridView on the other hand is easier and faster, so unless you need special layout to display your data, use GridView.