Results 1 to 2 of 2

Thread: How to Getting the Value of the column, and the row of Selected Cell in the MSDBGrid

  1. #1

    Thread Starter
    Junior Member vbITJunior's Avatar
    Join Date
    Sep 2002
    Location
    Philippines
    Posts
    22

    Exclamation How to Getting the Value of the column, and the row of Selected Cell in the MSDBGrid


    Hi,
    I am populating a MSDBGrid using the ADO control. And i would like to get the row value and the column value of the DataGrid to where i selected the cell into the Datagrid.



    Hope u can help me......

    tnx in advance..... ur great!!!!



    -=-
    ambs

  2. #2
    Lively Member
    Join Date
    Nov 2002
    Location
    Delaware
    Posts
    126
    I've used the data grid in the past to do that

    VB Code:
    1. Private Sub DataGrid1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    2.  
    3.   RowValue = DataGrid1.RowContaining(Y)
    4.   ColumnValue = DataGrid1.ColContaining(X)
    5.  
    6.   SaveValue = DataGrid1.Columns(ColumnValue).CellValue(DataGrid1.RowBookmark(RowValue))
    7.  
    8.   'do operation with cell value
    9.  
    10. end sub

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