On every RadGrid in my web application, I am having an issue where the pager is not displaying on the initial page load. After doing a post back, and rebinding the data, the pager shows up. Code for one of my grids is below:
An example of a rebinding that makes the pager display is below:
Does anyone have an idea as to what might be causing this? It is happening on every single RadGrid in my application. As I didn't have much data in the database through development, I never noticed the issue before. Now that we are beginning to populate, it is becoming a problem. Thank you for any help you can provide
| <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" |
| DataSourceID="SqlDataSource1" GridLines="None" AllowPaging="True" |
| Skin="Black"> |
| <MasterTableView DataSourceID="SqlDataSource1" PageSize="15"> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridBoundColumn DataField="Name" HeaderText="Name" |
| SortExpression="Name" UniqueName="columnName"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Address1" HeaderText="Address1" |
| SortExpression="Address1" UniqueName="columnAddress1"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Address2" HeaderText="Address2" |
| SortExpression="Address2" UniqueName="columnAddress2"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="City" HeaderText="City" |
| SortExpression="City" UniqueName="columnCity"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="State" HeaderText="State" |
| SortExpression="State" UniqueName="columnState"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Zip" HeaderText="Zip" |
| SortExpression="Zip" UniqueName="columnZip"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Phone" HeaderText="Phone" |
| SortExpression="Phone" UniqueName="columnPhone"> |
| </telerik:GridBoundColumn> |
| </Columns> |
| <PagerStyle Mode="NumericPages" /> |
| </MasterTableView> |
| </telerik:RadGrid> |
| <asp:SqlDataSource ID="SqlDataSource1" |
| ConnectionString="<%$ ConnectionStrings:TLRGCPortal %>" |
| ProviderName="System.Data.SqlClient" SelectCommand="spGetLocations" |
| runat="server" SelectCommandType="StoredProcedure"></asp:SqlDataSource> |
An example of a rebinding that makes the pager display is below:
| protected void btnClear_Click(object sender, EventArgs e) |
| { |
| txtSearch.Text = ""; |
| SqlDataSource1.SelectCommand = "spGetEmployeeDirectory"; |
| SqlDataSource1.SelectCommandType = SqlDataSourceCommandType.StoredProcedure; |
| SqlDataSource1.SelectParameters.Clear(); |
| SqlDataSource1.DataBind(); |
| } |
Does anyone have an idea as to what might be causing this? It is happening on every single RadGrid in my application. As I didn't have much data in the database through development, I never noticed the issue before. Now that we are beginning to populate, it is becoming a problem. Thank you for any help you can provide