Exemple #1
0
 private void UiListaPiloto_BeforeLeaveRow(object sender, DevExpress.XtraGrid.Views.Base.RowAllowEventArgs e)
 {
     for (var i = 0; i < UiListaPiloto.RowCount; i++)
     {
         var registro = (Piloto)UiListaPiloto.GetRow(i);
         if (registro == null) continue;
         if (registro.IS_SELECTED)
         {
             UiListaPiloto.SelectRow(i);
         }
     }
 }
Exemple #2
0
 private void UiListaPiloto_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (e.ControllerRow >= 0)
     {
         var registro = (Piloto)UiListaPiloto.GetRow(e.ControllerRow);
         registro.IS_SELECTED = (e.Action == CollectionChangeAction.Add);
     }
     else
     {
         if (UsuarioSeleccionoListaCompletaDePilotos)
         {
             for (var i = 0; i < UiListaPiloto.RowCount; i++)
             {
                 var registro = (Piloto)UiListaPiloto.GetRow(i);
                 if (registro == null) continue;
                 registro.IS_SELECTED = (UiListaPiloto.SelectedRowsCount != 0);
             }
             UsuarioSeleccionoListaCompletaDePilotos = false;
         }
     }
     var edit = UiListaPilotos;
     if (edit == null) return;
     edit.Text = ObtenerTextoAMostrarEnListaDePilotos();
 }