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. from a datagrid in one to a textbox in another form

from a datagrid in one to a textbox in another form

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

    this is a major major problem for me...i could fail my module if i dont implement this in my system!! i've downloaded some examples from this site but i could not understand whats it doing..and how to implement it in my forms..im hoping some one out there can help me out here...it'll be one reall really appreciated help. anyways this is my situation, i have frmQueue which has a datagrid showing only one column (ACCT ID) and another form named frmDiagnosis which has got a textbox called txtACCTID. the user clicks on the first cell in the datagrid in frmQueue and it gets loaded in the textbox in frmDiagnosis. pls some one help me here. im new to C# so the examples really make me feel blur... :(( CODER

    M 1 Reply Last reply
    0
    • A ASGill

      this is a major major problem for me...i could fail my module if i dont implement this in my system!! i've downloaded some examples from this site but i could not understand whats it doing..and how to implement it in my forms..im hoping some one out there can help me out here...it'll be one reall really appreciated help. anyways this is my situation, i have frmQueue which has a datagrid showing only one column (ACCT ID) and another form named frmDiagnosis which has got a textbox called txtACCTID. the user clicks on the first cell in the datagrid in frmQueue and it gets loaded in the textbox in frmDiagnosis. pls some one help me here. im new to C# so the examples really make me feel blur... :(( CODER

      M Offline
      M Offline
      Mazdak
      wrote on last edited by
      #2

      Declare private varibale in your frmQueue class , type of your frmdiagnosis , and set the TopMost property of it to true. Then when you want to create your form use Show() instead of ShowDialog() ,and then in the CurrentCellChange event of Datagrid set the text of frmQueue varibale, but don't forget to set the textbox modifier to public. Mazy "A bank is a place that will lend you money if you can prove that you don't need it." - Bob Hope

      A 1 Reply Last reply
      0
      • M Mazdak

        Declare private varibale in your frmQueue class , type of your frmdiagnosis , and set the TopMost property of it to true. Then when you want to create your form use Show() instead of ShowDialog() ,and then in the CurrentCellChange event of Datagrid set the text of frmQueue varibale, but don't forget to set the textbox modifier to public. Mazy "A bank is a place that will lend you money if you can prove that you don't need it." - Bob Hope

        A Offline
        A Offline
        ASGill
        wrote on last edited by
        #3

        Declare private varibale in your frmQueue class , type of your frmdiagnosis , and set the TopMost property of it to true. hi mazdak, im not clear about what u said, how do i declare the variable?.. just : "private string celldata"??? and also the forms are already opened. hope u can help me here thx in advance CODER

        M 1 Reply Last reply
        0
        • A ASGill

          Declare private varibale in your frmQueue class , type of your frmdiagnosis , and set the TopMost property of it to true. hi mazdak, im not clear about what u said, how do i declare the variable?.. just : "private string celldata"??? and also the forms are already opened. hope u can help me here thx in advance CODER

          M Offline
          M Offline
          Mazdak
          wrote on last edited by
          #4

          ASGill wrote: how do i declare the variable?.. :eek: Yes. ASGill wrote: and also the forms are already opened. Well, you open them somewhere, they haven't open by magic , whenever you open second one use Show() instead of ShowDialog(). Mazy "A bank is a place that will lend you money if you can prove that you don't need it." - Bob Hope

          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