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. General Programming
  3. C#
  4. copy row of one datagrid to another in C#

copy row of one datagrid to another in C#

Scheduled Pinned Locked Moved C#
csharpcsshelp
3 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.
  • S Offline
    S Offline
    shafiullah123
    wrote on last edited by
    #1

    I have two data grids on a windows form......... On double-clicking a row on first datagrid i want that row grid should get copied onto the second data grid under new auto incremented row number........ can any one help please regards :)

    M 1 Reply Last reply
    0
    • S shafiullah123

      I have two data grids on a windows form......... On double-clicking a row on first datagrid i want that row grid should get copied onto the second data grid under new auto incremented row number........ can any one help please regards :)

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      Identify the row Create a new row in the target table copy each field into the new row save the target table to get the ID OR clone the selected row add cloned row to target table.

      Never underestimate the power of human stupidity RAH

      R 1 Reply Last reply
      0
      • M Mycroft Holmes

        Identify the row Create a new row in the target table copy each field into the new row save the target table to get the ID OR clone the selected row add cloned row to target table.

        Never underestimate the power of human stupidity RAH

        R Offline
        R Offline
        Ramkithepower
        wrote on last edited by
        #3

        You select the row using itemindex and pick that row using this itemindex to select the row of the datasource(should be a dataset) and then add that row to the datasource of the second dataset and the bind it again.

        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