排序和分页 (EntityDataSource)

更新:2007 年 11 月

EntityDataSource 控件支持对查询返回的数据进行自动排序和分页。EntityDataSource 控件的 AutoPage() 和 AutoSort() 属性是布尔属性,指示是否为数据绑定控件启用分页和排序。当这些属性设置为 true 时,EntityDataSource 控件根据数据绑定控件提供给 EntityDataSourceView 的信息将相应的查询生成器方法添加到 ObjectQuery<T>

AutoPage() 属性的值决定 EntityDataSourceView 控件的 CanPage 属性是 true 或 false。AutoSort() 属性的值决定 EntityDataSourceView 控件的 CanSortCanRetrieveTotalRowCount 属性是 true 或 false。

请参见

概念

配置 EntityDataSource 控件

对结果进行排序 (EntityDataSource)

EntityDataSource 设计器

自定义命令文本 (EntityDataSource)

其他资源

以对象形式查询数据 (Entity Framework)