This is a migrated thread and some comments may be shown as answers.

Pager not showing up in Grid

1 Answer 140 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chris Messineo
Top achievements
Rank 1
Chris Messineo asked on 17 Sep 2008, 02:14 PM
Not sure why this is happening but the Paging footer is not showing up in he grid.

Here is the source (note I did not include the Column part):

 <telerik:RadGrid ID="RadGrid1" runat="server" Skin="Office2007"
                        AllowPaging="True" PageSize="20" AutoGenerateColumns="False"
                        GridLines="None" Allowsorting="False" AllowFilteringByColumn="True"
                        AlternatingItemStyle-BackColor="#eeeeee" ShowGroupPanel="True"
                    ShowStatusBar="True"
                    onneeddatasource="RadGrid1_NeedDataSource">
                        <AlternatingItemStyle BackColor="#EEEEEE"></AlternatingItemStyle>
                        <MasterTableView  DataKeyNames="MarketingID"
                            PagerStyle-Mode="NextPrevNumericAndAdvanced">
<PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
                        </MasterTableView>
                        <ClientSettings AllowDragToGroup="True">
                        </ClientSettings>
                        <FilterMenu Skin="Office2007" EnableTheming="True">
                        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                        </FilterMenu>
                    </telerik:RadGrid>           


        protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            ClientDataContext db = new ClientDataContext();
            var query = from m in db.Marketings.OrderBy(m => m.Client.ClientName).OrderBy(m => m.MarketingFormattedID)
                select new {
                    m.MarketingID,
                    m.MarketingFormattedID,
                    m.ClientID,
                    m.Client.ClientName,
                    m.Description,
                    m.MarketingType.MarketingTypeName,
                    m.SubmitDate,
                    m.ReportDate
                };
            RadGrid1.VirtualItemCount = query.Count();
            RadGrid1.DataSource = query.Skip(RadGrid1.CurrentPageIndex * RadGrid1.PageSize).Take(RadGrid1.PageSize);

        }

I stepped through the code and sure enough VirtualItemCount is set to 106, but the pager footer does not show up.

Any help would be appreciated.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 18 Sep 2008, 04:46 AM
Hi Chris,

Try setting the AlwaysVisible property for the PagerStyle to true in the aspx and see whether the Pager is appearing.

ASPX:
 <MasterTableView  PagerStyle-AlwaysVisible="true"  DataSourceID="SqlDataSource1"
              

Thanks
Shinu.
Tags
Grid
Asked by
Chris Messineo
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or