Results 1 to 3 of 3

Thread: [RESOLVED] Which entry from a Datagrid was selected ??

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2005
    Posts
    52

    Thumbs up [RESOLVED] Which entry from a Datagrid was selected ??

    Hi,

    How can I know, which line from a datagrid was selected by a user ?

    My idea is the following: to have a Datagrid containing a Customer_id and Name fields. Once the user select the row from the Datagrid, I need to know which customer was selected and then pass that valued to another variable.

    Would appreciate your help.

    Thanks,
    Joao.
    Last edited by jfortes; Apr 27th, 2005 at 04:34 PM. Reason: RESOLVED

  2. #2
    Frenzied Member mar_zim's Avatar
    Join Date
    Feb 2004
    Location
    Toledo Cebu City.
    Posts
    1,416

    Re: Which entry from a Datagrid was selected ??

    Quote Originally Posted by jfortes
    Hi,

    How can I know, which line from a datagrid was selected by a user ?

    My idea is the following: to have a Datagrid containing a Customer_id and Name fields. Once the user select the row from the Datagrid, I need to know which customer was selected and then pass that valued to another variable.

    Would appreciate your help.

    Thanks,
    Joao.
    VB Code:
    1. 'in the datagrid click event
    2. messagebox.show(datagrid1.item(datagrid1.currentcell.rownumber,0)) 'it gets the first column value of your datagrid.

  3. #3

    Thread Starter
    Member
    Join Date
    Apr 2005
    Posts
    52

    Re: Which entry from a Datagrid was selected ??

    hi thanks, your suggestion works just fine.
    Joao

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