Ver Mensaje Individual
  #4 (permalink)  
Antiguo 02/04/2007, 15:21
Avatar de RootK
RootK
Moderador
 
Fecha de Ingreso: febrero-2002
Ubicación: México D.F
Mensajes: 8.004
Antigüedad: 22 años, 3 meses
Puntos: 50
Re: Recorrer ListBox

y así no te sirve:

Código:
string LotesPoy = "";//Variable para items seleccinados
System.Data.DataRowView dr = null;
if (lstLotesPOY.SelectedItems.Count > 0)//Pregunto si hay items seleccionados
{
       LotesPoy = "('";
       for (int i = 0; i < lstLotesPOY.Items.Count; i++)
      {
            if (lstLotesPOY.GetSelected(i) == true)//Esto lo use para ver si el item en la posicion i esta seleccionado
               {
dr = (System.Data.DataRowView)lstLotesPOY.Items[i];
                    LotesPoy = LotesPoy + dr["Columna"].ToString().Substring(0, 3) + "', '";
                }
            }
                LotesPoy = LotesPoy.Substring(0, LotesPoy.Length - 3) + ")";
       }
return LotesPoy;