网格视图与列表视图 [英] Grid View vs. List View

查看:195
本文介绍了网格视图与列表视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是使用列表视图上的GridView的优势是什么?我需要分页,编辑行,插入行和删除行中我的观点。其中控制是最好的呢?这似乎是GridView控件不支持数据寻呼机。我会怎么牺牲,如果我迁移我的GridView的列表视图来?

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?

推荐答案

GridView的支持:

GridView supports:

  • 通过单击排序
  • 在页面
  • 编辑
  • 选择
  • 基于模板的布局(内呈现<表>
  • sorting by click
  • paging
  • editing
  • selection
  • template-based layout (rendered within <table>)

ListView的支持:

ListView supports:

  • 项目
  • 在页面(需要使用DataPager的)
  • 编辑
  • 选择
  • 通过点击排序(需要手动创建一个事件处理)
  • 基于模板的布局(如你想它+提供了更多的模板,例如渲染 - GroupTemplate)

使用ListView的是,如果你需要一些特殊的布局,例如,创建同一行中放置一个以上的项目表,或从挣脱原因表为基础渲染共) - 这是不可能的GridView的

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.

,另一方面使用的GridView 是更容易和更快,所以,除非你需要特殊的布局,以显示你的数据,使用GridView控件。

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

这篇关于网格视图与列表视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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