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. Adding row from datagrid to another datagrid in asp.net using C#.Net

Adding row from datagrid to another datagrid in asp.net using C#.Net

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasewpfwcf
2 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.
  • A Offline
    A Offline
    attalurisubbu
    wrote on last edited by
    #1

    Hi all, I have one datagrid, i am binding the datagrid with records from DB.My need is if i click one of the binded record that particular record should be added to the another datagrid. It should be on serverside only. Can any body give idea to do this. Thanks in advance, eswar.

    N 1 Reply Last reply
    0
    • A attalurisubbu

      Hi all, I have one datagrid, i am binding the datagrid with records from DB.My need is if i click one of the binded record that particular record should be added to the another datagrid. It should be on serverside only. Can any body give idea to do this. Thanks in advance, eswar.

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      Handle datagrid's ItemCommand event. Caste datagrid's DataSource to a DataTable instance if you used it for binding. Find the row index from event handler parameters, fetch the row from DataTable using this index. Create new DataTable instance and add the DataRow (You need to clone it) to there. Bind the second grid with this new datatable.

      All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

      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