【发布时间】:2012-11-19 14:28:20
【问题描述】:
我有一个带有数组列表的ICollection 类LabCollection。这个数组列表包含另一个类LabEntity。 LabEntity 具有 LabID、LabName 等属性。
我正在将 ICollection 类绑定到 gridview:
LabCollection objLabCollection = new LabCollection();
gridview.DataSource = objlabCollection;
gridview.DataBind();
我想将页面索引/分页应用于gridview,我该如何使用上述方法。
【问题讨论】:
-
你的问题不够清楚。你想要什么页面索引?你试过什么?
-
我的意思是gridview中的页面索引。之前我使用数据表绑定到网格视图并使用数据视图进行事件页面索引更改以在网格视图中实现页面索引。现在我使用上面提到的 Icollection 类作为数据源。我想知道页面索引如何应用于事件使用 Icollection 为 gridview 更改页面索引。
标签: c# asp.net gridview pagination