Results 1 to 3 of 3

Thread: Show Cell Contents from Datagrid (Resolved)

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2003
    Location
    Three Rivers, MI
    Posts
    354

    Show Cell Contents from Datagrid (Resolved)

    How do I show the contents of the cell in a datagrid instead of the row index as I am below.
    VB Code:
    1. '
    2.     Private Sub dgvRoutes_CurrentCellChanged( _
    3.         ByVal sender As Object, _
    4.         ByVal e As System.EventArgs) _
    5.         Handles dgvRoutes.CurrentCellChanged
    6.  
    7.         Dim id As String = CStr(dgvRoutes.CurrentCell.RowNumber)
    8.         MessageBox.Show(id)
    9.     End Sub
    Last edited by BukHix; Jul 4th, 2009 at 11:46 AM. Reason: Resolved

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Show Cell Contents from Datagrid

    Code:
    Messagebox.show (dgvRoutes.Item(dgvRoutes.CurrentCell.RowNumber, 5))
    would show the contents of cell 5 in the current row
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2003
    Location
    Three Rivers, MI
    Posts
    354

    Re: Show Cell Contents from Datagrid

    Thank you Petevick. That worked perfectly.

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