|
-
June 21st, 2001, 02:50 PM
#1
data grid
How do i retrieve the text of a specific cell in a datagrid. in a flexgrid you do the following:
text =flxGrid.TextMatrix(1, 17)
but i cant figure how to do the same in a grid.
-
June 21st, 2001, 03:12 PM
#2
Re: data grid
Option Explicit
Dim igColumn As Integer
Dim igRow As Integer
Dim vargBookmark As Variant
Private Sub DBGrid1_MouseUp(Button As Integer, Shift As Integer, _
X As Single, Y As Single)
igColumn = DBGrid1.ColContaining(X) 'Set the Cell Column number
igRow = DBGrid1.RowContaining(Y) 'Set the Cell Row number
vargBookmark = DBGrid1.RowBookmark(igRow) 'Set Bookmark Value
'Show the contents of the cell in a textbox
Text1.Text = DBGrid1.Columns(igColumn).CellValue(vargBookmark)
End Sub
I just grabbed this off of the MSDN online library. You can check it out at...
http://support.microsoft.com/support.../0/94.asp?FR=0
I hope that helps out!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|