Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Set focus on row after edit

Set focus on row after edit

Scheduled Pinned Locked Moved ASP.NET
helpcssquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    treuveni
    wrote on last edited by
    #1

    Hi, i've a GridView with 1000 rows, one column of the grid is "Edit". My problem is - when i'm press on some row (for ex. row mumber 600) the page is set to the top, and then i need to scroll and find the row that become editable. How i can set the focus on the row that i selected (after i pressed on "Edit"). Can someone please help me?

    N 1 Reply Last reply
    0
    • T treuveni

      Hi, i've a GridView with 1000 rows, one column of the grid is "Edit". My problem is - when i'm press on some row (for ex. row mumber 600) the page is set to the top, and then i need to scroll and find the row that become editable. How i can set the focus on the row that i selected (after i pressed on "Edit"). Can someone please help me?

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      Try using the MaintainScrollPositionOnPostBack[^] property


      I know the language. I've read a book. - _Madmatt

      T 1 Reply Last reply
      0
      • N Not Active

        Try using the MaintainScrollPositionOnPostBack[^] property


        I know the language. I've read a book. - _Madmatt

        T Offline
        T Offline
        treuveni
        wrote on last edited by
        #3

        I've set it at Page_Init and it works great 10x

        D 1 Reply Last reply
        0
        • T treuveni

          I've set it at Page_Init and it works great 10x

          D Offline
          D Offline
          Daniel Casserly
          wrote on last edited by
          #4

          you can just set this on the aspx page at the top in the declaration this might be a little easier.

          Three types of people in this world, those that can count and those that can't www.casserlyprogramming.com

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups