Paging

Discussion in 'ASP .Net Datagrid Control' started by Arne, Jul 28, 2005.

  1. Arne

    Arne Guest

    How do get my pageIndexChanged event to fire?
    --Code behind fragment
    Public Sub PromoGrid_PageIndexChanged(ByVal source As Object, ByVal e As
    System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles
    PromoGrid.PageIndexChanged
    PromoGrid.CurrentPageIndex = e.NewPageIndex
    bindDataGrid()
    End Sub
    -- Here is by aspx page fragment
    <asp:datagrid id="PromoGrid" runat="server" EnableViewState="False"
    AllowPaging="True" AutoGenerateColumns="False" CellPadding="4"
    OnPageIndexChanged="PromoGrid_PageIndexChanged">


    All the examples I can find uses code inline. I am using code behind.
     
    Arne, Jul 28, 2005
    #1
    1. Advertising

  2. Arne

    Teemu Keiski Guest

    Remove EnableViewState="false" e.g enable the view state for the control.

    --
    Teemu Keiski
    ASP.NET MVP, AspInsider
    Finland, EU
    http://blogs.aspadvice.com/joteke

    "Arne" <> wrote in message
    news:...
    > How do get my pageIndexChanged event to fire?
    > --Code behind fragment
    > Public Sub PromoGrid_PageIndexChanged(ByVal source As Object, ByVal e As
    > System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles
    > PromoGrid.PageIndexChanged
    > PromoGrid.CurrentPageIndex = e.NewPageIndex
    > bindDataGrid()
    > End Sub
    > -- Here is by aspx page fragment
    > <asp:datagrid id="PromoGrid" runat="server" EnableViewState="False"
    > AllowPaging="True" AutoGenerateColumns="False" CellPadding="4"
    > OnPageIndexChanged="PromoGrid_PageIndexChanged">
    >
    >
    > All the examples I can find uses code inline. I am using code behind.
     
    Teemu Keiski, Jul 28, 2005
    #2
    1. Advertising

  3. Arne

    Arne Guest

    Kitos

    "Arne" wrote:

    > How do get my pageIndexChanged event to fire?
    > --Code behind fragment
    > Public Sub PromoGrid_PageIndexChanged(ByVal source As Object, ByVal e As
    > System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles
    > PromoGrid.PageIndexChanged
    > PromoGrid.CurrentPageIndex = e.NewPageIndex
    > bindDataGrid()
    > End Sub
    > -- Here is by aspx page fragment
    > <asp:datagrid id="PromoGrid" runat="server" EnableViewState="False"
    > AllowPaging="True" AutoGenerateColumns="False" CellPadding="4"
    > OnPageIndexChanged="PromoGrid_PageIndexChanged">
    >
    >
    > All the examples I can find uses code inline. I am using code behind.
     
    Arne, Jul 28, 2005
    #3
    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. Yangtsi River

    using Paging in Datagrid

    Yangtsi River, Jul 9, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    342
    Benjie Fallar
    Jul 9, 2003
  2. Saravana

    Re: Custom paging

    Saravana, Jul 10, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    421
    Saravana
    Jul 10, 2003
  3. =?Utf-8?B?UGF0cmljay5PLklnZQ==?=

    DataSet paging vs Datareader paging

    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=, Oct 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    10,711
    Scott Allen
    Oct 8, 2004
  4. wh1974
    Replies:
    0
    Views:
    2,440
    wh1974
    Jan 12, 2005
  5. Red
    Replies:
    1
    Views:
    726
Loading...

Share This Page