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. Select Row

Select Row

Scheduled Pinned Locked Moved C#
saleshelpquestion
6 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.
  • R Offline
    R Offline
    Rmokkenstorm
    wrote on last edited by
    #1

    Hi there, A little quistion. I have a Form that contain's a textfield and a Button. If the button is pressed a new form opens (the old form stays open too) The new form contains a datagrid where the user can select a customer. On the dubble click of the row the form closes and should put this value into the textfield. the select row is not the problem. the dubbelclick isn't a problem as wel. the problem is how can i fill the textbox when dubbelclicked on the row. I can pass the data between the forms. and usaly i use the initialize component or formload to fill up the forms. But in this case he doesn't reopen the first form.

    A 1 Reply Last reply
    0
    • R Rmokkenstorm

      Hi there, A little quistion. I have a Form that contain's a textfield and a Button. If the button is pressed a new form opens (the old form stays open too) The new form contains a datagrid where the user can select a customer. On the dubble click of the row the form closes and should put this value into the textfield. the select row is not the problem. the dubbelclick isn't a problem as wel. the problem is how can i fill the textbox when dubbelclicked on the row. I can pass the data between the forms. and usaly i use the initialize component or formload to fill up the forms. But in this case he doesn't reopen the first form.

      A Offline
      A Offline
      albCode
      wrote on last edited by
      #2

      on double click event : Form1 frm1 = new Form1(); frm1.TextBox1.Text = selectedrow text

      R 1 Reply Last reply
      0
      • A albCode

        on double click event : Form1 frm1 = new Form1(); frm1.TextBox1.Text = selectedrow text

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

        that opens a new form and that is not exactly what i want cause he loads my populate textbox event which is defined by initialzi components.

        A 1 Reply Last reply
        0
        • R Rmokkenstorm

          that opens a new form and that is not exactly what i want cause he loads my populate textbox event which is defined by initialzi components.

          A Offline
          A Offline
          albCode
          wrote on last edited by
          #4

          Form1 frm1 = new Form1(); frm1.TextBox1.Text = //value this code doesn't open form as u see it's declared new instance of Form and then via that instance it's refered to text of textbox.

          R 1 Reply Last reply
          0
          • A albCode

            Form1 frm1 = new Form1(); frm1.TextBox1.Text = //value this code doesn't open form as u see it's declared new instance of Form and then via that instance it's refered to text of textbox.

            R Offline
            R Offline
            Rmokkenstorm
            wrote on last edited by
            #5

            oke open was maybe a bad word to use.. but if i use this he will go to the initialize components section of the form and i wan't to skip that part i really don't want him to do this.. cause there he loads an event wich contains data from a previous form. any way he doesn;t load this 2 times.

            R 1 Reply Last reply
            0
            • R Rmokkenstorm

              oke open was maybe a bad word to use.. but if i use this he will go to the initialize components section of the form and i wan't to skip that part i really don't want him to do this.. cause there he loads an event wich contains data from a previous form. any way he doesn;t load this 2 times.

              R Offline
              R Offline
              Rmokkenstorm
              wrote on last edited by
              #6

              If i want to bypass this with a if else sting.empty he says that he cannot covert string to bool.

              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