Results 1 to 2 of 2

Thread: Datagrid Column

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Pilipinas
    Posts
    441

    Datagrid Column

    Assuming this is my DataGrid and its record.

    ===========================
    |StudNo | StudName |
    ===========================
    |001 | MeeJee Joi |
    ---------------------------
    |002 | Gou Li |
    ---------------------------
    |003 | William Ho |
    ---------------------------

    I have tried:
    MessageBox.Show(DataGrid1.Item(0,0)) 'and this code worked and it display "001"

    But how about when the user select and click on the other record like for example on the row 3 which is "003",
    and this code doesnt work: MessageBox.Show(DataGrid1.Item(0,0))

    All I want to happen is, When I on the DataGrid, it display the current StudNo of each record using Message Box!
    Anyone can help me please!

  2. #2
    Addicted Member CoMMiE's Avatar
    Join Date
    Jul 2000
    Location
    Malaysia, Kuala Lumpur
    Posts
    179
    Hi
    Try this:
    MessageBox.Show(DataGrid1.Item(DataGrid1.CurrentRowIndex,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