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. Windows Forms
  4. how to transfer data from textbox to gridview?

how to transfer data from textbox to gridview?

Scheduled Pinned Locked Moved Windows Forms
tutorialquestion
6 Posts 4 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.
  • G Offline
    G Offline
    ganesh kumarrr
    wrote on last edited by
    #1

    i have two windows form, in one form i have a textbox, in another form,i have a gridview, all i want is how to transfer the data from textbox to gridview after i click the button?

    L A 2 Replies Last reply
    0
    • G ganesh kumarrr

      i have two windows form, in one form i have a textbox, in another form,i have a gridview, all i want is how to transfer the data from textbox to gridview after i click the button?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      ganesh kumarrr wrote:

      all i want is how to transfer the data from textbox to gridview after i click the button?

      In the event handler for the button. Take the text from the text box and put it in the gridview. Or do I misunderstand your question?

      G 1 Reply Last reply
      0
      • L Lost User

        ganesh kumarrr wrote:

        all i want is how to transfer the data from textbox to gridview after i click the button?

        In the event handler for the button. Take the text from the text box and put it in the gridview. Or do I misunderstand your question?

        G Offline
        G Offline
        ganesh kumarrr
        wrote on last edited by
        #3

        s u are correct, but how to code it?

        L 1 Reply Last reply
        0
        • G ganesh kumarrr

          s u are correct, but how to code it?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          ganesh kumarrr wrote:

          how to code it?

          Read the documentation on TextBox and GridView classes. In there you will discover all the properties and methods that will allow you to accomplish this task, plus you will learn all sorts of good things that will help you in the future.

          M 1 Reply Last reply
          0
          • L Lost User

            ganesh kumarrr wrote:

            how to code it?

            Read the documentation on TextBox and GridView classes. In there you will discover all the properties and methods that will allow you to accomplish this task, plus you will learn all sorts of good things that will help you in the future.

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

            You're translator is broken

            Richard MacCutchan wrote:

            ganesh kumarrr wrote: how to code it?

            This = snd codz plz I did like you response though.

            Never underestimate the power of human stupidity RAH

            1 Reply Last reply
            0
            • G ganesh kumarrr

              i have two windows form, in one form i have a textbox, in another form,i have a gridview, all i want is how to transfer the data from textbox to gridview after i click the button?

              A Offline
              A Offline
              AhmedMasum
              wrote on last edited by
              #6

              add a string variable int the form that has the grid view. overload the constructor that take a string argument. You have to initialize the string variable by the given parameter.Then call the constructor from the form that has the texbox as follows: gridviewform f = new gridviewform(texbox1.text); f.Show(); write this code in the formload event of form that has the grid view. int p = dataGridView1.Rows.Add(); dataGridView1.Rows[p].Cells[0].Value = your string variable

              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