Results 1 to 2 of 2

Thread: DataGrid value

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2002
    Posts
    1

    Thumbs up DataGrid value

    How Do you do this (VB6)

    Me.DataGrid1.Columns(1).Value

    In Vb.net to get the current row value.

    Cheers

  2. #2
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Dublin (Ireland)
    Posts
    304
    here's an example:

    Dim currow As Integer
    currow = DataGrid2.CurrentRowIndex
    Label38.Text = DataGrid2.Item(currow, 0)

    In this example, the label text is set to the value of the 1st cell in the current selected row, but it could be any column, just chnage the 0 to the column number (which start from 0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width