Ver Mensaje Individual
  #8 (permalink)  
Antiguo 15/02/2011, 13:39
Ka0stj
 
Fecha de Ingreso: febrero-2010
Ubicación: México
Mensajes: 738
Antigüedad: 15 años, 1 mes
Puntos: 37
Respuesta: Crear consulta SQL según checkbox marcados

Lo puedes recorrer de la siguiente manera:

Código c#:
Ver original
  1. foreach (System.Windows.Forms.Control ElControl in this.Controls)
  2.             {
  3.                 if (ElControl is System.Windows.Forms.CheckBox)
  4.                 {
  5.                     if (((CheckBox)ElControl).Checked == true)
  6.                     {
  7.                         MessageBox.Show(ElControl.Name.ToString());
  8.                     }
  9.                 }
  10. }
__________________
http://ka0stj.wordpress.com/