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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Move up and down in Grid

Move up and down in Grid

Scheduled Pinned Locked Moved ASP.NET
questioncss
3 Posts 2 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.
  • M Offline
    M Offline
    member27
    wrote on last edited by
    #1

    Hi all, Iam using a grid in my web application.. I want to move the row up if i Click the up button and move a row down in down button How can i do using javascripts??i got the rowindex var grid=igtbl_getGridById("grid"); var actrow=grid.getActiveRow(); var rowindex=actrow.getIndex(); using this rowindex how can i move the row to up or down.. can anyone suggest me? if any other way also suggest me.

    B 1 Reply Last reply
    0
    • M member27

      Hi all, Iam using a grid in my web application.. I want to move the row up if i Click the up button and move a row down in down button How can i do using javascripts??i got the rowindex var grid=igtbl_getGridById("grid"); var actrow=grid.getActiveRow(); var rowindex=actrow.getIndex(); using this rowindex how can i move the row to up or down.. can anyone suggest me? if any other way also suggest me.

      B Offline
      B Offline
      Baran M
      wrote on last edited by
      #2

      One Idea ...! Add a button in grid's footer row so that it will raise RowCommand Event. From there try this, if(e.CommandName.Equals("Button1")) { if(GridView1.SelectedIndex != -1 && GridView1.SelectedIndex < GridView1.Rows.Count ) { GridView1.SelectedIndex = GridView1.SelectedIndex +1; } } it will work :)

      M 1 Reply Last reply
      0
      • B Baran M

        One Idea ...! Add a button in grid's footer row so that it will raise RowCommand Event. From there try this, if(e.CommandName.Equals("Button1")) { if(GridView1.SelectedIndex != -1 && GridView1.SelectedIndex < GridView1.Rows.Count ) { GridView1.SelectedIndex = GridView1.SelectedIndex +1; } } it will work :)

        M Offline
        M Offline
        member27
        wrote on last edited by
        #3

        can i use the same code for infragistics grid?

        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