How to remove AJAX style postback when paging a gridview.

Discussion in 'ASP .Net' started by davidjgonzalez@gmail.com, Aug 14, 2006.

  1. Guest

    I have a GridView that has paging enabled. Each item (as defined in an
    ItemTemplate) includes several controls which have operations i would
    like to Atlas-enable. Everything is working well except when I page the
    GridView (the paging controllers are in the gridview's footer). The
    webpage doesnt scroll back to the top of the page, so when paging
    through the GridView the user is always looking at the last 4-5 items
    on the page. My current markup looks something like:

    <UpdatePanel>
    <ContentItem>
    <GridView...>
    <ItemTemplate...>
    <Controls_that_need_to_be_atlas_enabled>
    </ItemTemplate>
    <PagerSettings/>
    </GridView>
    </ContentItem>
    </UpdatePanel>

    I tried to put the <UpdatePanel> within the <ItemTemplate> and even
    inside the <Control...> however Visual Studio 2005 complains that an
    UpdatePanel cannot exist inside an <ItemTemplate>

    I havent tired adding triggers, however I dont know how well that will
    work because the Controls/events that need to be tied to the triggers
    exist within the <Controls>.

    Any insight on how to keep paging from making Atlas style postbacks
    would be appreciated.

    Thanks
    , Aug 14, 2006
    #1
    1. Advertising

  2. Not using AJAX style callbacks on a GridView is the default, if you don't set
    EnableSortingAndPagingCallbacks="True" then it should not use them. You
    could try explicitly setting EnableSortingAndPagingCallbacks="False" but this
    is the default.

    "" wrote:

    > I have a GridView that has paging enabled. Each item (as defined in an
    > ItemTemplate) includes several controls which have operations i would
    > like to Atlas-enable. Everything is working well except when I page the
    > GridView (the paging controllers are in the gridview's footer). The
    > webpage doesnt scroll back to the top of the page, so when paging
    > through the GridView the user is always looking at the last 4-5 items
    > on the page. My current markup looks something like:
    >
    > <UpdatePanel>
    > <ContentItem>
    > <GridView...>
    > <ItemTemplate...>
    > <Controls_that_need_to_be_atlas_enabled>
    > </ItemTemplate>
    > <PagerSettings/>
    > </GridView>
    > </ContentItem>
    > </UpdatePanel>
    >
    > I tried to put the <UpdatePanel> within the <ItemTemplate> and even
    > inside the <Control...> however Visual Studio 2005 complains that an
    > UpdatePanel cannot exist inside an <ItemTemplate>
    >
    > I havent tired adding triggers, however I dont know how well that will
    > work because the Controls/events that need to be tied to the triggers
    > exist within the <Controls>.
    >
    > Any insight on how to keep paging from making Atlas style postbacks
    > would be appreciated.
    >
    > Thanks
    >
    >
    =?Utf-8?B?Y2xpY2tvbg==?=, Aug 14, 2006
    #2
    1. Advertising

  3. joaosilva

    Joined:
    May 30, 2007
    Messages:
    1
    AJAX-enabled GridView

    I really liked this article. This is my first time using this website. I usually use codeproject and kynou.com. Codeproject has some cool article about ajax-enabled gridview and kynou.com has a walkthough tutorial about ajax-enabled gridview.
    joaosilva, May 30, 2007
    #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. wh1974
    Replies:
    0
    Views:
    2,415
    wh1974
    Jan 12, 2005
  2. Replies:
    2
    Views:
    4,300
  3. Matt Winward
    Replies:
    1
    Views:
    388
    Matt Winward
    Mar 5, 2008
  4. Iain
    Replies:
    1
    Views:
    1,882
    Alexey Smirnov
    Nov 23, 2009
  5. Ken Varn
    Replies:
    0
    Views:
    428
    Ken Varn
    Apr 26, 2004
Loading...

Share This Page