1
我在我的用戶控件下面的代碼:ASP.NET的GridView不顯示我的PagerTemplate
<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
設置。我要瘋了!
UPDATE:
做一些詳盡的google搜索後,我發現,我可能用非常老版本的CSS友好控制適配器。我相信如此,因爲this bug也讓我感到震驚!那麼我怎麼知道我使用的這些適配器的版本?我甚至不知道我在使用它們!
更新2:
的問題是,我使用的是舊版本的CSS友好控制適配器。我下載了最新的源代碼,編譯它,使用了新的DLL和.browser文件,現在它工作得很好。我在這裏留下這個問題,所以遇到同樣問題的任何人都可能從中找到幫助。
+1用於查找解決方案,但您應該發佈答案並將其標記爲答案。 –
@Jim:完成,明天最早只能接受它。 –