I am trying to set the pagertextformat from the codebehind.
I have tried doing so from the Page_Load and also from the NeedDataSource functions, but neither is working.
When I use set the format from the aspx page, it works fine.
Here is the line I am using:
Grid code below. Again, if I just put it inline with the grid declaration, it works fine.
Thanks.
I have tried doing so from the Page_Load and also from the NeedDataSource functions, but neither is working.
When I use set the format from the aspx page, it works fine.
Here is the line I am using:
gv.PagerStyle.PagerTextFormat =
"Page:{4} Page {0} of {1}";
Is there some other method I need to be using?
Grid code below. Again, if I just put it inline with the grid declaration, it works fine.
Thanks.
| <telerik:RadGrid ID="gv" |
| OnNeedDataSource="gv_NeedDataSource" |
| OnItemCommand="gv_OnItemCommand" |
| AllowMultiRowSelection="true" |
| PageSize="50" |
| Width="625px" |
| Skin="Windows7" |
| CssClass="Custom" |
| runat="server" > |
| <ClientSettings> |
| <Selecting AllowRowSelect="true" /> |
| </ClientSettings> |
| <MasterTableView DataKeyNames="messageID, messageRead" AutoGenerateColumns="False" Width="100%" AllowSorting="true" AllowPaging="true" AllowCustomPaging="true" TableLayout="Fixed"> |
| <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" PageButtonCount="5" /> |
| <Columns> |
| <telerik:GridClientSelectColumn HeaderStyle-Width="35px" ItemStyle-Width="35px" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" /> |
| <telerik:GridTemplateColumn SortExpression="Subject" UniqueName="Subject" EditFormColumnIndex="2"> |
| <ItemTemplate> |
| <asp:LinkButton ID="lbMsg" Text='<%#Eval("subject")%>' runat="server" CommandArgument='<%#Eval("messageID")%>' CommandName="msg"/> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| <telerik:GridTemplateColumn SortExpression="messageDate" UniqueName="Date" EditFormColumnIndex="3"> |
| <ItemTemplate> |
| <%#GetDate(Eval("messageDate"), Eval("messageRead"))%> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |