Programmatically Scroll GridView Control

Discussion in 'ASP .Net' started by Axeman, Apr 25, 2007.

  1. Axeman

    Axeman Guest

    I have an AJAX enabled web form with several data-filled GridView
    controls. The users accessing this web app will navigate the site via
    touch-screen monitors (i.e.: no mouse). As a result, I need an easy
    way for them to scroll the GridViews when the data is not visible. I
    want them to click on a button, which will then accordingly scroll the
    grid up or down. I have tried all the various combinations of the
    suggestions that I could find:

    GridView.Rows(20).RowState = DataControlRowState.Selected

    and

    GridView.Rows(20).Focus()

    and

    GridView.SelectedIndex = 20

    and

    'Set focus to a hidden button control (column)
    GridView.SelectedRow.Cells(5).Focus()

    If I could set focus to a particular row, I think it should scroll to
    show that row. This would be fine, but nothing seems to work. Anyone
    have any suggestions on how I could programatically scroll a GridView
    control?

    Thanks!
     
    Axeman, Apr 25, 2007
    #1
    1. Advertising

  2. Axeman

    bruce barker Guest

    for a serverside solution, use paging, not scrolling.

    -- bruce (sqlwork.com)


    Axeman wrote:
    > I have an AJAX enabled web form with several data-filled GridView
    > controls. The users accessing this web app will navigate the site via
    > touch-screen monitors (i.e.: no mouse). As a result, I need an easy
    > way for them to scroll the GridViews when the data is not visible. I
    > want them to click on a button, which will then accordingly scroll the
    > grid up or down. I have tried all the various combinations of the
    > suggestions that I could find:
    >
    > GridView.Rows(20).RowState = DataControlRowState.Selected
    >
    > and
    >
    > GridView.Rows(20).Focus()
    >
    > and
    >
    > GridView.SelectedIndex = 20
    >
    > and
    >
    > 'Set focus to a hidden button control (column)
    > GridView.SelectedRow.Cells(5).Focus()
    >
    > If I could set focus to a particular row, I think it should scroll to
    > show that row. This would be fine, but nothing seems to work. Anyone
    > have any suggestions on how I could programatically scroll a GridView
    > control?
    >
    > Thanks!
    >
     
    bruce barker, Apr 25, 2007
    #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. nicholas
    Replies:
    0
    Views:
    455
    nicholas
    Dec 7, 2004
  2. Kevin
    Replies:
    1
    Views:
    9,656
    Roland
    Feb 5, 2005
  3. Sathiamoorthy

    Enable Scroll up and scroll down in CR-report

    Sathiamoorthy, Nov 9, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    942
    zobalee
    Nov 28, 2006
  4. UJ
    Replies:
    1
    Views:
    621
    John Timney \(MVP\)
    Nov 1, 2006
  5. =?Utf-8?B?Ui5OaWprYW1w?=

    Listbox disabled - cant scroll in IE - can scroll in Firefox

    =?Utf-8?B?Ui5OaWprYW1w?=, Nov 22, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    1,280
    =?Utf-8?B?Ui5OaWprYW1w?=
    Nov 22, 2006
Loading...

Share This Page