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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top