Home All Groups Group Topic Archive Search About
Author
14 Jul 2005 12:42 PM
Yoshitha
Hi,

I have a data drid in my web application i set paging as 10.
it is showing 10 rows at the first page when i navigate to next page it is
showing the same page when i click it again it is showing some with in the
first page itself.

i wrote the code like this in the code behind page

Private Sub grdSkills_PageIndexChanged(ByVal source As System.Object, ByVal
e As System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles
grdSkills.PageIndexChanged

        grdSkills.CurrentPageIndex = e.NewPageIndex

End Sub

It is not navigating properly. when i place the cursor on the page no it
showing error in the task bar that java
script:_dopostback('grdskills$_Ctl14$_ctl1',"



Please can one help me out.



Regards & thanks,

Krishna Murthy.K

Author
14 Jul 2005 4:49 PM
societopia.net
You have to re-bind the datagrid to the datasource after you have changed the
CurrentPageIndex. 
---
www.societopia.net


Show quoteHide quote
"Yoshitha" wrote:

> Hi,
>
> I have a data drid in my web application i set paging as 10.
> it is showing 10 rows at the first page when i navigate to next page it is
> showing the same page when i click it again it is showing some with in the
> first page itself.
>
> i wrote the code like this in the code behind page
>
> Private Sub grdSkills_PageIndexChanged(ByVal source As System.Object, ByVal
> e As System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles
> grdSkills.PageIndexChanged
>
>         grdSkills.CurrentPageIndex = e.NewPageIndex
>
> End Sub
>
> It is not navigating properly. when i place the cursor on the page no it
> showing error in the task bar that java
> script:_dopostback('grdskills$_Ctl14$_ctl1',"
>
>
>
> Please can one help me out.
>
>
>
> Regards & thanks,
>
> Krishna Murthy.K
>
>
>
Author
15 Jul 2005 4:21 AM
Manoj Mevada
hi,
  u have to bind grid once again after setting Current page index

grdSkills.CurrentPageIndex = e.NewPageIndex
grdSkills.DataBind()

regards

manoj




societopia.net wrote:
Show quoteHide quote
> You have to re-bind the datagrid to the datasource after you have changed the
> CurrentPageIndex.
> ---
> www.societopia.net
>
>
> "Yoshitha" wrote:
>
> > Hi,
> >
> > I have a data drid in my web application i set paging as 10.
> > it is showing 10 rows at the first page when i navigate to next page it is
> > showing the same page when i click it again it is showing some with in the
> > first page itself.
> >
> > i wrote the code like this in the code behind page
> >
> > Private Sub grdSkills_PageIndexChanged(ByVal source As System.Object, ByVal
> > e As System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles
> > grdSkills.PageIndexChanged
> >
> >         grdSkills.CurrentPageIndex = e.NewPageIndex
> >
> > End Sub
> >
> > It is not navigating properly. when i place the cursor on the page no it
> > showing error in the task bar that java
> > script:_dopostback('grdskills$_Ctl14$_ctl1',"
> >
> >
> >
> > Please can one help me out.
> >
> >
> >
> > Regards & thanks,
> >
> > Krishna Murthy.K
> >
> >
> >