Sebastian
Sebastian

Reputation: 85

Paging in GridView not show up

I have GridView and this grid has setup paging, but this paging not show up... How can I fix it?

<asp:ObjectDataSource ID="odsUzivatele" runat="server" SelectMethod="VratUzivatele" 
    TypeName="ManagerUzivateleAdapter"></asp:ObjectDataSource>
<asp:GridView ID="gwUzivatele" runat="server" 
    DataSourceID="odsUzivatele" onrowdatabound="gwUzivatele_RowDataBound" 
    AllowPaging="True" PageSize="5" EnableModelValidation="True">
</asp:GridView>

Upvotes: -1

Views: 7160

Answers (3)

rajesh
rajesh

Reputation: 115

<asp:GridView
                    ID="gvFercDocket" runat="server" AllowPaging="True" AllowSorting="True"
                    AutoGenerateColumns="True" DataKeyNames="FERCDocket_Id" CssClass="tableHeader"
                    DataSourceID="EDSFERCDocket" Width="900px" ShowFooterWhenEmpty="true" ShowHeaderWhenEmpty="true"
                    ShowFooter="true" ShowHeader="true" OnRowCreated="gvFercDocket_RowCreated" PageSize="10">
                    <PagerSettings PageButtonCount="10" Visible="False" />

Upvotes: -1

Sebastian
Sebastian

Reputation: 85

Problem was in RowDataBound event, I show down first (index 0) cell... After remove this event, paging show up.... Thank for reply. :)

Upvotes: 3

Nilesh Umaretiya
Nilesh Umaretiya

Reputation: 35

<asp:GridView ID="grdList" runat="server" AutoGenerateColumns="False" 

            GridLines="None" PageSize="4" AllowPaging="True"
            EmptyDataText="No record found" 
            onpageindexchanging="grdList_PageIndexChanging"

    protected void grdList_PageIndexChanging(object sender, GridViewPageEventArgs e)    
    {
        grdList.PageIndex = e.NewPageIndex;
        fillgrid();
    }

Upvotes: 0

Related Questions