My gridView:
<asp:GridView ID="gridView1" runat="server" CellPadding="4" AllowPaging="true" PageSize="5" emptydatatext="No data available."
CssClass="datagrid"
ForeColor="#333333" GridLines="None"
onrowcreated="gridView1_RowCreated"
onpageindexchanging="gridView1_PageIndexChanging">
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<EditRowStyle BackColor="#999999" />
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#E9E7E2" />
<SortedAscendingHeaderStyle BackColor="#506C8C" />
<SortedDescendingCellStyle BackColor="#FFFDF8" />
<SortedDescendingHeaderStyle BackColor="#6F8DAE" />
</asp:GridView>
And my codebehind:
protected void gridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
gridView1.PageIndex = e.NewPageIndex;
BindDataGrid();
}
protected void BindDataGrid()
{
DataSet ds = new DataSet();
ds = dbM.GetInfo(name, mobilePhone, info1); //get info to BD and save in "ds"
gridView1.DataSource = ds;
gridView1.DataBind();
}
and the "Paging" does not work. It shows the first 5 rows, but does not show the number of paging
What´s wrong???
Please help
thanks