I have the following code in my user control:
<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>
For some reason, no matter what I do, the pager isn't rendered at all. Why?
It isn't even shown if I remove the PagerTemplate
tag and use some standard Mode
setting in PagerSettings
. I'm going crazy!
UPDATE:
After doing some exhaustive googling, I find that I'm probably using a very old version of the CSS Friendly Control Adapters. I believe so since this bug has struck me as well! So how do I know what version of these adapters that I'm using? I wasn't even aware I was using them!
UPDATE 2:
The problem was that I was using an old version of CSS Friendly Control Adapters. I downloaded the latest source code, compiled it, used the new DLL and .browser file and now it works just fine. I'm leaving this question here so anyone experiencing the same issue may find help from it.