Hello!
I`m making a Board using gridview, but I have one problem.
I want to make a paging, and I only using Grid View basic paging.... from database(sql)
What I want to do is like this
<< < 1 2 3 4 5 > >>
<< is first, < is previous, 1 2 3 4 5 is numeric and 5 is max numeric count
and > is next, >> is last
Now I`m searching about this from the Internet.. I`m confusing how to use it....
So Please... somebody show me the right way to make it...
What I have tried:
Only using in basic paging like this
-- Html Code --
<asp:GridView ID="GridView1"
runat="server"
CellPadding="4"
ForeColor="#333333"
GridLines="None"
Width="862px"
RowStyle-HorizontalAlign="Center"
AutoGenerateColumns="False"
DataKeyNames="BoardItemID"
AllowPaging="True"
PageSize="5"
OnPageIndexChanging="GridView1_PageIndexChanging"
ShowHeaderWhenEmpty="true"
EmptyDataText="Data not found.">
-- Code Behind --
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
PutGridView();
}