DataGrid and Paging.

Discussion in 'ASP .Net Web Controls' started by mjcast, Jun 29, 2005.

  1. mjcast

    mjcast Guest

    I am working on a web page, and I have to use paging on my datagrids. How do
    I implement paging on the datagrid so that the paging works with just one
    click and I do not have to reload my data. The datagrid already has data in
    it, it just doesnt make sense to me to have to reload it.

    I am overriding this method
    private void a_participantGroupDg_PageIndexChanged(object source,
    System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
    {
    a_participantGroupDg.CurrentPageIndex = e.NewPageIndex;

    }
    but if i do this the paging is not applied till the next postback. Is there
    a way to do this without reloading my datasource and rebinding the control?

    thanks in advance
     
    mjcast, Jun 29, 2005
    #1
    1. Advertising

  2. The short answer is no.

    Infragistics has built in support for you to store all of the rows in the
    ViewState of their webgrid control. The asp webgrid does not have this
    feature implemented.

    The .net 2.0 gridview control does have this feature.

    It is not trivial to extend the asp webgrid to include this feature. Search
    google for alternate options to the Infragistics or ComponentOne grids.
    --
    Staff Consultant II - Enterprise Web Services - Cardinal Solutions Group

    Future Business Model - National City Mortgage


    "mjcast" wrote:

    > I am working on a web page, and I have to use paging on my datagrids. How do
    > I implement paging on the datagrid so that the paging works with just one
    > click and I do not have to reload my data. The datagrid already has data in
    > it, it just doesnt make sense to me to have to reload it.
    >
    > I am overriding this method
    > private void a_participantGroupDg_PageIndexChanged(object source,
    > System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
    > {
    > a_participantGroupDg.CurrentPageIndex = e.NewPageIndex;
    >
    > }
    > but if i do this the paging is not applied till the next postback. Is there
    > a way to do this without reloading my datasource and rebinding the control?
    >
    > thanks in advance
     
    Michael Baltic, Jun 29, 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. =?Utf-8?B?UGF0cmljay5PLklnZQ==?=

    DataSet paging vs Datareader paging

    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=, Oct 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    10,864
    Scott Allen
    Oct 8, 2004
  2. Roger
    Replies:
    0
    Views:
    981
    Roger
    Dec 28, 2004
  3. wh1974
    Replies:
    0
    Views:
    2,485
    wh1974
    Jan 12, 2005
  4. Red
    Replies:
    1
    Views:
    767
  5. Green Start Button

    DataGrid.Items.Count and DataGrid Paging...

    Green Start Button, Aug 4, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    5,872
    agravar
    Aug 2, 2006
Loading...

Share This Page