[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.
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:
'in the datagrid click event
messagebox.show(datagrid1.item(datagrid1.currentcell.rownumber,0)) 'it gets the first column value of your datagrid.
Re: Which entry from a Datagrid was selected ??
hi thanks, your suggestion works just fine.
Joao