AYUDA CON LISTVIEW
como puedo saber si tengo alguna fila seleccionada en un listview. Necesito saber si tengo algun elemento seleccionado antes d hacer algo.
gracias
gracias
Muy Facil
If ListView1.ListItems(1).Selected Then
'aqui tu codigo
End If
Si te interesa tambien el VisualBasic.net visita:
http://www.EstoEsVisual.Net
Un Saludo,
Tomas
If ListView1.ListItems(1).Selected Then
'aqui tu codigo
End If
Si te interesa tambien el VisualBasic.net visita:
http://www.EstoEsVisual.Net
Un Saludo,
Tomas
Tomás, eso no es correcto. Eso solamente prueba a ver si el elemento 1 está seleccionado, pero no dice nada acerca del elemento 2, por ejemplo.
La manera correcta es:
If Not(ListView1.SelectedItem is nothing) then
'Sí hay un elemento seleccionado...
end if
La manera correcta es:
If Not(ListView1.SelectedItem is nothing) then
'Sí hay un elemento seleccionado...
end if
