Paging Stops working?

Discussion in 'ASP .Net Web Controls' started by Rob, May 12, 2004.

  1. Rob

    Rob Guest

    Hey yall.
    I have a datagrid returning over 13K records, so obvious to do paging
    right?
    well I also have template/button columns in the grid so originally, I
    was having the problem of the item command event firing before paging
    and paging was not working at all,

    To fix that, I added If e.Item.ItemIndex > -1 Then itemcommand code...
    to my item event sub and now paging works.. well sort of,

    Now after the first click of next page, the paging stops working, when
    I click on Next it refreshes but does not refresh the data to the next
    set it stays the same , I have simple code in the PageIndexChanged
    event.. Me.dataGrid.CurrentPageIndex = e.NewPageIndex
    dataGrid.DataBind()

    any advice as always appreciated.
     
    Rob, May 12, 2004
    #1
    1. Advertising

  2. --------------------
    >From: (Rob)
    >Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    >Subject: Paging Stops working?
    >Date: 12 May 2004 09:02:08 -0700
    >Hey yall.
    >I have a datagrid returning over 13K records, so obvious to do paging
    >right?
    >well I also have template/button columns in the grid so originally, I
    >was having the problem of the item command event firing before paging
    >and paging was not working at all,
    >
    >To fix that, I added If e.Item.ItemIndex > -1 Then itemcommand code...
    >to my item event sub and now paging works.. well sort of,
    >
    >Now after the first click of next page, the paging stops working, when
    >I click on Next it refreshes but does not refresh the data to the next
    >set it stays the same , I have simple code in the PageIndexChanged
    >event.. Me.dataGrid.CurrentPageIndex = e.NewPageIndex
    >dataGrid.DataBind()
    >
    >any advice as always appreciated.
    >


    Hi there,

    There are a few examples online that you can have a look at:

    http://msdn.microsoft.com/library/d...ghdisplayingdatainlistboxesonwebformspage.asp
    http://msdn.microsoft.com/library/d...cifyingpagingbehaviorindatagridwebcontrol.asp

    This site has lots of How To examples for the datagrid: http://authors.aspalliance.com/aspxtreme/webforms/controls/datagrid.aspx


    Hope that helps,

    Michelle

    ***Disclaimer: This posting is provided "as is" with no warranties and confers no rights.***
     
    Michelle Hlaing, Jan 24, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike Bridge

    Postback stops working after a while?

    Mike Bridge, Jul 9, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    378
    Mike Bridge
    Jul 9, 2003
  2. feng
    Replies:
    1
    Views:
    292
  3. =?Utf-8?B?TWFyc2hhbGw=?=

    LDAP Active Directory Bind Stops Working

    =?Utf-8?B?TWFyc2hhbGw=?=, Oct 13, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    4,120
    =?Utf-8?B?TWFyc2hhbGw=?=
    Oct 18, 2004
  4. Nikhil Patel

    application stops working sometimes

    Nikhil Patel, Nov 29, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    323
    Nikhil Patel
    Nov 29, 2004
  5. Nikhil Patel

    application stops working

    Nikhil Patel, Nov 29, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    342
    =?Utf-8?B?dHJpbml0eXBldGU=?=
    Jan 5, 2005
Loading...

Share This Page