how datagrid scrollbar can keep same position after postback

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default how datagrid scrollbar can keep same position after postback

    Hi,
    I have a datagrid with 200 rows and an iframe adjacent to it.
    When I click on the row, the details of that row show up in the
    iframe.
    Now suppose I click on the 150th row, the postback occurs and I lose
    the view of my selected row because the datagrid now has the scrollbar
    repositioned to the top,with datagrid showing the first 70 rows.

    How can I keep the scrollbar where it was before the postback so that
    the selected row(which in this case is at the bottom of the
    datagrid)remains in focus after the postback event?

    Please don't suggest pagination.
    TIA
    Deepika
    deepika Guest

  2. Similar Questions and Discussions

    1. Scrollbar position changed effect
      Hi, How can I add an easing effect to my application's scrollbar so when I change the scrollbar's position, the movement to be applied is...
    2. setting the vertical scrollbar position
      Ok, I have a div on the left had side of the page and inside of this div are a list of folders and you can add folders to this list. Well when the...
    3. UserControl inside of datagrid - loses its viewstate when datagrid is re-bound on postback
      I have a simple usercontrol, a datepicker which contains 3 dropdownlist , it resides inside a datagrid column and i set the selecteddate property of...
    4. custom usercontrol inside of datagrid - loses its state/viewstate on re-bind/postback of the datagrid
      I have a simple usercontrol, a datepicker which contains 3 dropdownlist , it resides inside a datagrid column and i set the selecteddate property of...
    5. Controlling DataGrid scrollbar position
      I've enabled a scroll bar on some of my datagrids but I've noticed that if I select an item from the datagrid, the scrollbar gets set to the top....
  3. #2

    Default Re: how datagrid scrollbar can keep same position after postback

    You could probably use SmartNavigation.
    Here's more information:
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuipageclasssmartnavigationtopic.asp[/url]
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconpage.asp[/url]

    And here's an alternate technique that uses anchor tags:
    [url]http://www.dotnetjunkies.com/tutorials.aspx?tutorialid=681[/url]

    --
    I hope this helps,
    Steve C. Orr, MCSD
    [url]http://Steve.Orr.net[/url]


    "deepika" <deepika@volcanomail.com> wrote in message
    news:7474a18f.0308011034.403f7149@posting.google.c om...
    > Hi,
    > I have a datagrid with 200 rows and an iframe adjacent to it.
    > When I click on the row, the details of that row show up in the
    > iframe.
    > Now suppose I click on the 150th row, the postback occurs and I lose
    > the view of my selected row because the datagrid now has the scrollbar
    > repositioned to the top,with datagrid showing the first 70 rows.
    >
    > How can I keep the scrollbar where it was before the postback so that
    > the selected row(which in this case is at the bottom of the
    > datagrid)remains in focus after the postback event?
    >
    > Please don't suggest pagination.
    > TIA
    > Deepika

    Steve C. Orr, MCSD Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139