Re: Datagrid larger numbered pages not working



DOH! I found the problem! Stupid coding issue... I added a line for
debugging at one point and forgot to remove it. My bad!

Thanks for your help!

Andrea


"Elton Wang" <anonymous@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:09ae01c53aa3$a90ba4c0$a601280a@xxxxxxxxxx
> Could you show more your code, such as HTML, data source
> loading?
>
> Elton Wang
>
> >-----Original Message-----
> >That is not the problem, even if I add the line you are
> talking about, the
> >pages numbered 11 and above do not work even though the
> pages numbered 1
> >through 10 do work.
> >
> >Any other ideas?
> >
> >Andrea
> >
> >
> >"Elton Wang" <anonymous@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote
> in message
> >news:033801c53a4a$9af92fa0$a401280a@xxxxxxxxxx
> >> DataGrid1.DataBind() is not re-bind data source.
> >> datagrid.DataBind() itself is only processing after data
> >> binding. Following code shows data binding:
> >>
> >> DataGrid1.DataSource = dataset; //or datatable, dataview
> >> DataGrid1.DataBind();
> >>
> >>
> >> HTH
> >>
> >> Elton Wang
> >> elton_Wang@xxxxxxxxxxx
> >>
> >> >-----Original Message-----
> >> >I didn't recieve any information to help me before so
> I'm
> >> posting this again
> >> >with edits...
> >> >
> >> >I have a datagrid that only shows 2 items per page.
> The
> >> page numbers appear
> >> >at the bottome of each page for the user to page
> through
> >> the list. It shows
> >> >1 through 10 and the links for pages 1 through 10 work
> >> properly.
> >> >
> >> >After the "10" link there is a "..." link. If I click
> >> the "..." link I can
> >> >see
> >> >page numbers 11 through 20 and another "..." link. My
> >> basic problem is
> >> >that these pages don't show the correct information.
> If
> >> I click the link
> >> >for "12", then the page goes to page "3" instead
> >> of "12". So basically,
> >> >it's treating the link as 1 through 10 instead of 11
> >> through 20.
> >> >
> >> >Also, I click the next "..." link, it sends me back to
> >> the first 1 through
> >> >10 pages instead of 21 through 30. I know there are
> >> enough items that
> >> >34 pages should show up.
> >> >
> >> >Code to change the page is as follows:
> >> >
> >> >private void DataGrid1_PageIndexChanged(object source,
> >> >System.Web.UI.WebControls.DataGridPageChangedEventArgs
> e)
> >> >
> >> >{
> >> >
> >> >this.DataGrid1.CurrentPageIndex = e.NewPageIndex;
> >> >
> >> >if (this.mdsDataSource != null) //Makes sure the
> >> dataset is still
> >> >available to the page
> >> >
> >> >this.DataGrid1.DataBind(); //Rebinds the dataset to
> >> the datagrid
> >> >
> >> >}
> >> >
> >> >
> >> >.
> >> >
> >
> >
> >.
> >


.



Relevant Pages

  • RE: row display in a datagrid
    ... Create a custom control that can show your 28 attributes properly, ... manually loop thru data source to dynamically generate the control instances. ... >> Elton Wang ... >>> constant width where the title fits in and cells of the row enlarge in height ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: new in CGI::Session::Driver::postgredsql nonexisting
    ... Now you should do some debugging before posting another error. ... Read the docs for DBI's connect method, your data source isn't correct, ... If I replace all the session code with: ... $cgi = new CGI; ...
    (comp.lang.perl.misc)
  • Re: Datagrid larger numbered pages not working
    ... Could you show more your code, such as HTML, data source ... >> Elton Wang ... >>>I have a datagrid that only shows 2 items per page. ... >>>that these pages don't show the correct information. ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
  • Re: Problem in Updating records in DataGrid Control
    ... I was facing. ... >> I guess that you bind the datagrid's data source every ... no matter it's in first time or postback. ... >> Elton Wang ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: TextBox Value
    ... Do you only bind datagrid's data source when it's not ... >> Hi Simon, ... >> Elton Wang ... >>>I have TextBox column in datagrid. ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)