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. Visual Basic
  4. how to retrieve values from datagrid ?

how to retrieve values from datagrid ?

Scheduled Pinned Locked Moved Visual Basic
questiontutorial
3 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.
  • S Offline
    S Offline
    sumit21
    wrote on last edited by
    #1

    i have a datagrid whose datasource is a datatable now, i want to retrive the values of a particular cell of a datagrid. how can i do this also i want to increment the position of currentrow by 1 how can i do it sumit

    R 1 Reply Last reply
    0
    • S sumit21

      i have a datagrid whose datasource is a datatable now, i want to retrive the values of a particular cell of a datagrid. how can i do this also i want to increment the position of currentrow by 1 how can i do it sumit

      R Offline
      R Offline
      Robert Rohde
      wrote on last edited by
      #2

      For accessing values use the indexer of the grid:

      Dim o As Object = myGrid(rowIndex, columnIndex)

      For incrementing:

      myGrid.CurrentRowIndex += 1

      S 1 Reply Last reply
      0
      • R Robert Rohde

        For accessing values use the indexer of the grid:

        Dim o As Object = myGrid(rowIndex, columnIndex)

        For incrementing:

        myGrid.CurrentRowIndex += 1

        S Offline
        S Offline
        sumit21
        wrote on last edited by
        #3

        i want to retrieve the text written at the cell how to use "dim o as object" to get the text also, can i make datagrid editable, so that user can write into it. i basically want to do a insert operation i have adatatable showing the table on my database db1.mdb now i want that if user wants to insert a row , he simply types the values in the next row and pressses button "btn_insert". at click event of this event i want to insert the row which user had entered in the datagrid plz help

        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