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. fetching the value of a datafield into a textbox

fetching the value of a datafield into a textbox

Scheduled Pinned Locked Moved C#
tutorial
6 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.
  • N Offline
    N Offline
    Nitin raj
    wrote on last edited by
    #1

    hi, after fetching the data into the datagridview, how to display the value of a particular field of a selected row, in a textbox.

    Nitin Raj Bidkikar

    S K 2 Replies Last reply
    0
    • N Nitin raj

      hi, after fetching the data into the datagridview, how to display the value of a particular field of a selected row, in a textbox.

      Nitin Raj Bidkikar

      S Offline
      S Offline
      Sun Rays
      wrote on last edited by
      #2

      Hi, for that you have to start with evetn of SelectedIndex Changing of gridview. in that u will get selectedindex using e.RowIndex.. Now u can get any cell's value from that.

      Thanks, Sun Rays To get something you must have to try once. My Articles

      N 1 Reply Last reply
      0
      • N Nitin raj

        hi, after fetching the data into the datagridview, how to display the value of a particular field of a selected row, in a textbox.

        Nitin Raj Bidkikar

        K Offline
        K Offline
        KennyPatel
        wrote on last edited by
        #3

        Hi Dear.:laugh: TextBox1.Text = GridView1.Rows[GridView1.SelectedIndex].Cells[1].Text; Write this in your GridViewChanging or Some Button Click event will help you....sure... Thanks

        "Good Thing Goes With Good People..."

        N 1 Reply Last reply
        0
        • K KennyPatel

          Hi Dear.:laugh: TextBox1.Text = GridView1.Rows[GridView1.SelectedIndex].Cells[1].Text; Write this in your GridViewChanging or Some Button Click event will help you....sure... Thanks

          "Good Thing Goes With Good People..."

          N Offline
          N Offline
          Nitin raj
          wrote on last edited by
          #4

          your solution doesnt word, as Iam using datagridview and not gridview, its a windows application, not an asp. the selectedindex is not provided in datagridview please help

          Nitin Raj Bidkikar

          1 Reply Last reply
          0
          • S Sun Rays

            Hi, for that you have to start with evetn of SelectedIndex Changing of gridview. in that u will get selectedindex using e.RowIndex.. Now u can get any cell's value from that.

            Thanks, Sun Rays To get something you must have to try once. My Articles

            N Offline
            N Offline
            Nitin raj
            wrote on last edited by
            #5

            Iam using datagridview and not gridview, its a windows application, not an asp. there is no selected index available .please help

            Nitin Raj Bidkikar

            S 1 Reply Last reply
            0
            • N Nitin raj

              Iam using datagridview and not gridview, its a windows application, not an asp. there is no selected index available .please help

              Nitin Raj Bidkikar

              S Offline
              S Offline
              Sun Rays
              wrote on last edited by
              #6

              Hi, check this.. it will help you.

              Thanks, Sun Rays To get something you must have to try once. My Articles

              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