how detect selected line in datagrid

  • Thread starter Thread starter Rafael Metring
  • Start date Start date
R

Rafael Metring

How can i detect the selected line in datagrid and how to send the selected
value to other form ?

I need know whats cliente cod was selected to display complet information in
other form..

Tanks
 
Hyo Rafael,
I use this way:

If grd.IsSelected(grd.CurrentRowIndex) Then
mCliCod = CType(grd.Item(grd.CurrentRowIndex, 0), Short)
Endif

So, with .CurrentRowIndex u can get the line selected,
the .IsSelected is for error handling when no item is selected.

well, u cand send information to ur form using Constructor parameters,
Shared variables,
or many other forms, i guess.

Cya,
Felipe T.
 
Back
Top