private void UiVistaErpEncabezado_BeforeLeaveRow(object sender, DevExpress.XtraGrid.Views.Base.RowAllowEventArgs e) { for (var i = 0; i < UiVistaErpEncabezado.RowCount; i++) { var documento = (DocumentoRecepcionErpEncabezado)UiVistaErpEncabezado.GetRow(i); if (documento == null) { continue; } if (documento.IS_SELECTD) { UiVistaErpEncabezado.SelectRow(i); } } }
private void UiVistaErpEncabezado_SelectionChanged(object sender, DevExpress.Data.SelectionChangedEventArgs e) { try { if (e.ControllerRow >= 0) { var documento = (DocumentoRecepcionErpEncabezado)UiVistaErpEncabezado.GetRow(e.ControllerRow); documento.IS_SELECTD = (e.Action == CollectionChangeAction.Add); } else { if (UsuarioSeleccionoListaOrdenEncabezadoCompleta) { for (var i = 0; i < UiVistaErpEncabezado.RowCount; i++) { var documento = (DocumentoRecepcionErpEncabezado)UiVistaErpEncabezado.GetRow(i); if (documento == null) { continue; } documento.IS_SELECTD = (UiVistaErpEncabezado.SelectedRowsCount != 0); } UsuarioSeleccionoListaOrdenEncabezadoCompleta = false; } } var edit = ActiveControl as DevExpress.XtraEditors.SearchLookUpEdit; if (edit == null) { return; } edit.Text = ObtenerTextoAMostrarListaDocErp(); } catch (Exception ex) { InteraccionConUsuarioServicio.Mensaje(ex.Message); } }