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. Problem related to grid

Problem related to grid

Scheduled Pinned Locked Moved C#
cssdatabasehelp
7 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.
  • L Offline
    L Offline
    lalit14
    wrote on last edited by
    #1

    I have a grid and some textboxes Grid have data from database and i added a EDIT button with fields. The thing i want is----> Whenever i click on edit button the data associated with it will get display in textbox. I hope u all got what i want. Thanks in advance.

    OriginalGriffO V 2 Replies Last reply
    0
    • L lalit14

      I have a grid and some textboxes Grid have data from database and i added a EDIT button with fields. The thing i want is----> Whenever i click on edit button the data associated with it will get display in textbox. I hope u all got what i want. Thanks in advance.

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

      So whats the problem? In the button click event, get the info from the selected cell of the grid, and put it in the text box. Which bit are you having difficulty with? What have you tried?

      No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones

      "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

      L 1 Reply Last reply
      0
      • L lalit14

        I have a grid and some textboxes Grid have data from database and i added a EDIT button with fields. The thing i want is----> Whenever i click on edit button the data associated with it will get display in textbox. I hope u all got what i want. Thanks in advance.

        V Offline
        V Offline
        Vimalsoft Pty Ltd
        wrote on last edited by
        #3

        OriginalGriff is Correct, if you want to edit the gridview in ASP.net, you must enable the appropriate properties that will show you the edit,Delete and update per row and if you click on Edit,you do not need to write a code to do that, ASP.NET already will do it for you. The Values will be Presented in a Textbox , and in edit more for you to edit and the Update and Cancel Button will be available options for you.

        Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

        1 Reply Last reply
        0
        • OriginalGriffO OriginalGriff

          So whats the problem? In the button click event, get the info from the selected cell of the grid, and put it in the text box. Which bit are you having difficulty with? What have you tried?

          No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones

          L Offline
          L Offline
          lalit14
          wrote on last edited by
          #4

          Nothing clicking in my mind, what code to write in it?

          OriginalGriffO 1 Reply Last reply
          0
          • L lalit14

            Nothing clicking in my mind, what code to write in it?

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

            lalit14 wrote:

            Nothing clicking in my mind, what code to write in it?

            Write a button click event handler, hooked to your button. In the handler, write the code to: 1) Find the selected cell in your grid. 2) Get the text from the cell. 3) Put the text into your TextBox. At least two of these are simple, one-line-of-code-at-the-most bits of software. What have you tried?

            No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones

            "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

            L 1 Reply Last reply
            0
            • OriginalGriffO OriginalGriff

              lalit14 wrote:

              Nothing clicking in my mind, what code to write in it?

              Write a button click event handler, hooked to your button. In the handler, write the code to: 1) Find the selected cell in your grid. 2) Get the text from the cell. 3) Put the text into your TextBox. At least two of these are simple, one-line-of-code-at-the-most bits of software. What have you tried?

              No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones

              L Offline
              L Offline
              lalit14
              wrote on last edited by
              #6

              Thanks dude its working....!!

              OriginalGriffO 1 Reply Last reply
              0
              • L lalit14

                Thanks dude its working....!!

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

                You are welcome! Glad to hear it.

                No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones

                "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
                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