【发布时间】:2010-12-28 04:48:22
【问题描述】:
我的用户控件中有以下代码:
<asp:LinqDataSource ID="myLinqDataSource" runat="server" AutoSort="true"
ContextTypeName="MyDBContext" TableName="myTable" AutoPage="true"
Select="new(Edited, Activity)" Where="UserID == 4" />
<asp:GridView ID="gvTable" runat="server" ShowHeader="true"
PageSize="5" AllowPaging="true" AllowSorting="true"
DataSourceID="myLinqDataSource" AutoGenerateColumns="false"
OnRowDataBound="GridView_DataBound">
<Columns>
<asp:BoundField DataField="Edited" HeaderText="Date" DataFormatString="{0:d}" />
<asp:BoundField DataField="Activity" HeaderText="Notes" />
</Columns>
<PagerSettings Position="Bottom" />
<PagerStyle BackColor="Black" ForeColor="White" Wrap="false" />
<PagerTemplate>
Hello there
</PagerTemplate>
</asp:GridView>
出于某种原因,无论我做什么,寻呼机都不会呈现。为什么?
如果我删除PagerTemplate 标签并在PagerSettings 中使用一些标准Mode 设置,它甚至不会显示。我要疯了!
更新:
在进行了详尽的谷歌搜索后,我发现我可能正在使用一个 非常 旧版本的 CSS 友好控制适配器。我相信是这样,因为this bug 也让我印象深刻!那么我怎么知道我使用的是什么版本的适配器呢?我什至不知道我在使用它们!
更新 2:
问题是我使用的是旧版本的 CSS 友好控制适配器。我下载了最新的源代码,编译它,使用新的 DLL 和 .browser 文件,现在它工作得很好。我将这个问题留在这里,以便遇到相同问题的任何人都可以从中寻求帮助。
【问题讨论】:
-
+1 用于查找解决方案,但您可能应该发布答案并将其标记为答案。
-
@Jim:完成了,最早只能明天接受了。
标签: c# asp.net gridview pagination paging