Guys i want to replace grid built in icon for next page that is > and prev page is <
which i have done as
then i have hide the > and < as
GridPagerItem pager = (GridPagerItem)e.Item;
hdnPageCount.Value = pager.Paging.PageCount.ToString();
pager.PagerContentCell.Controls[1].Visible = false; //< if page count = 5
if (pager.Paging.PageCount <= 5)
{
if (pager.Paging.PageCount == 1)
{
pager.PagerContentCell.Controls[5].Visible = false;//> if page count=1 then it is on 5
}
if (pager.Paging.PageCount == 2)
{
pager.PagerContentCell.Controls[7].Visible = false;//> if page count=2 then it is on 7
}
if (pager.Paging.PageCount == 3)
{
pager.PagerContentCell.Controls[9].Visible = false; //> if page count=3 then it is on 9
}
if (pager.Paging.PageCount == 4)
{
pager.PagerContentCell.Controls[11].Visible = false; //> if page count=4 then it is on 9
}
if (pager.Paging.PageCount == 5)
{
pager.PagerContentCell.Controls[13].Visible = false;//> if page count = 5 then 13
}
}
but the problem is that when there are thousands of pages, it is impossible to get pager control index.
how to hide parmanently > and < from pagerStyle.?????
Note: i have used my own Next Page and Prev Page images instead of built in <, >
which i have done as
PagerTextFormat="Välj sida: <
a
onclick
=
'javascript:openPreviousPage();'
><
img
src
=
'../Images/newimages/left_singel_arrow.png'
style
=
'cursor:pointer;'
title
=
'Previous'
/></
a
> {4} <
a
onclick
=
'javascript:openNextPage();'
><
img
src
=
'../Images/newimages/right_singel_arrow.png'
style
=
'cursor:pointer;'
title
=
'Next'
/></
a
> Visar sida {0} av {1}, post {2} till {3} av {5}"
then i have hide the > and < as
GridPagerItem pager = (GridPagerItem)e.Item;
hdnPageCount.Value = pager.Paging.PageCount.ToString();
pager.PagerContentCell.Controls[1].Visible = false; //< if page count = 5
if (pager.Paging.PageCount <= 5)
{
if (pager.Paging.PageCount == 1)
{
pager.PagerContentCell.Controls[5].Visible = false;//> if page count=1 then it is on 5
}
if (pager.Paging.PageCount == 2)
{
pager.PagerContentCell.Controls[7].Visible = false;//> if page count=2 then it is on 7
}
if (pager.Paging.PageCount == 3)
{
pager.PagerContentCell.Controls[9].Visible = false; //> if page count=3 then it is on 9
}
if (pager.Paging.PageCount == 4)
{
pager.PagerContentCell.Controls[11].Visible = false; //> if page count=4 then it is on 9
}
if (pager.Paging.PageCount == 5)
{
pager.PagerContentCell.Controls[13].Visible = false;//> if page count = 5 then 13
}
}
but the problem is that when there are thousands of pages, it is impossible to get pager control index.
how to hide parmanently > and < from pagerStyle.?????
Note: i have used my own Next Page and Prev Page images instead of built in <, >