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. General Programming
  3. C#
  4. Trasnfer Data in datagrid in form1 to Text box in form2

Trasnfer Data in datagrid in form1 to Text box in form2

Scheduled Pinned Locked Moved C#
question
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
    shahramkeyboard
    wrote on last edited by
    #1

    I have Form1 form1 have 2 textbox & 1 button I cLICK bUTTON 1 tHEN SHOW fORM2 form2 have ONE datagrid i Want when Click IN row then Cell[0] transfer to Text BOX in form1 how i can?

    OriginalGriffO D 2 Replies Last reply
    0
    • S shahramkeyboard

      I have Form1 form1 have 2 textbox & 1 button I cLICK bUTTON 1 tHEN SHOW fORM2 form2 have ONE datagrid i Want when Click IN row then Cell[0] transfer to Text BOX in form1 how i can?

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      Set up an event in form2 that form1 subscribes to. Either pass the data via a custom EventArgs with the event, or via a property on form2.

      You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      1 Reply Last reply
      0
      • S shahramkeyboard

        I have Form1 form1 have 2 textbox & 1 button I cLICK bUTTON 1 tHEN SHOW fORM2 form2 have ONE datagrid i Want when Click IN row then Cell[0] transfer to Text BOX in form1 how i can?

        D Offline
        D Offline
        DaveyM69
        wrote on last edited by
        #3

        The principal is demonstrated here[^], just adapt it to suit your situation.

        Dave

        If this helped, please vote & accept answer!

        Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
        BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)

        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