RadGrid paging stopped working

4 posts, 0 answers
  1. Mark
    Mark avatar
    82 posts
    Member since:
    Jan 2015

    Posted 27 Jul 2017 Link to this post

    So paging was working now it doesn't.  Here is the code and grid layout:

    GRID

    <telerik:RadGrid ID="grdReport" runat="server" AllowPaging="True" AllowSorting="False" ExportSettings-IgnorePaging="true" AutoGenerateColumns="False" PageSize="20" Skin="Office2010Blue" OnPageIndexChanged="grdReport_PageIndexChanged">
                                    <GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
                                    <ExportSettings FileName="TestRejectReport" IgnorePaging="True">
                                    </ExportSettings>
                                    <MasterTableView>
                                        <Columns>
                                            <telerik:GridBoundColumn DataField="Line" FilterControlAltText="Filter Line column" HeaderText="Line" UniqueName="Line">
                                                <HeaderStyle HorizontalAlign="Center" Width="20px" />
                                                <ItemStyle HorizontalAlign="Right" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="Process" FilterControlAltText="Filter Process column" HeaderText="Process" UniqueName="Process">
                                                <HeaderStyle HorizontalAlign="Center" Width="50px" />
                                                <ItemStyle HorizontalAlign="Center" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="Product" FilterControlAltText="Filter Product column" HeaderText="Product" UniqueName="Product">
                                                <HeaderStyle HorizontalAlign="Center" Width="50px" />
                                                <ItemStyle HorizontalAlign="Center" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="Tested" FilterControlAltText="Filter Tested column" HeaderText="Tested" UniqueName="Tested">
                                                <HeaderStyle HorizontalAlign="Center" Width="30px" />
                                                <ItemStyle HorizontalAlign="Right" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="Passed" FilterControlAltText="Filter Passed column" HeaderText="Passed" UniqueName="Passed">
                                                <HeaderStyle HorizontalAlign="Center" Width="30px" />
                                                <ItemStyle HorizontalAlign="Right" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="Failed" FilterControlAltText="Filter Failed column" HeaderText="Failed" UniqueName="Failed">
                                                <HeaderStyle HorizontalAlign="Center" Width="30px" />
                                                <ItemStyle HorizontalAlign="Right" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="Yield" FilterControlAltText="Filter Yield column" HeaderText="Yield" UniqueName="Yield">
                                                <HeaderStyle HorizontalAlign="Center" Width="30px" />
                                                <ItemStyle HorizontalAlign="Right" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="Top5" FilterControlAltText="Filter Top5 column" HeaderText="(Count) Top n Rejects" UniqueName="Top5">
                                                <HeaderStyle HorizontalAlign="Center" Width="800px" />
                                                <ItemStyle HorizontalAlign="Left" Wrap="true" />
                                            </telerik:GridBoundColumn>                               
                                        </Columns>
                                    </MasterTableView>                       
                                </telerik:RadGrid>

     

    CODE:

    I load a datatable (I did see the data in it) and then bind in a button event

    grdReport.DataSource = dtReport;
    grdReport.DataBind();

    Session["Report"] = dtReport;
    Session.Timeout = 30;

     

     protected void grdReport_PageIndexChanged(object sender, GridPageChangedEventArgs e)
            {
                //**********
                //pagination
                //**********
                DataTable dt = (DataTable)Session["Report"];
                grdReport.DataSource = dt;
                grdReport.Rebind(); // DataBind();  // note I have tried DataBind and Rebind here
            }

    I get no grid when a page is selected.

    Thanks for your help in advance.

    Mark

  2. Mark
    Mark avatar
    82 posts
    Member since:
    Jan 2015

    Posted 27 Jul 2017 Link to this post

    Version I am running: 2016.3.1027.40
  3. Mark
    Mark avatar
    82 posts
    Member since:
    Jan 2015

    Posted 27 Jul 2017 in reply to Mark Link to this post

    So what is it with having to add grd.visibile = true now???  is that a C# issue?  That fixed my problem.
  4. Mark
    Mark avatar
    82 posts
    Member since:
    Jan 2015

    Posted 27 Jul 2017 in reply to Mark Link to this post

    So what is it with having to add grd.visibile = true now???  is that a C# issue?  That fixed my problem.
Back to Top