private void GRD_City_BeforeRowExpanded(object sender, Infragistics.Win.UltraWinGrid.CancelableRowEventArgs e) { if (e.Row.Band.ToString() == "TBL_City") { this.GRD_City.Rows.CollapseAll(false); } }
private void tBL_EducationLevelUltraGrid_BeforeRowExpanded(object sender, Infragistics.Win.UltraWinGrid.CancelableRowEventArgs e) { if (e.Row.Band.ToString() == "TBL_EducationLevel") { this.GRD_Studies.Rows.CollapseAll(false); if (e.Row.Cells["ID"].Text.ToString() == "6") { GRD_Studies.DisplayLayout.Bands["FK_TBL_Collage_TBL_EducationLevel"].Hidden = false; GRD_Studies.DisplayLayout.Bands["FK_TBL_EducYear_TBL_EducationLevel"].Hidden = true; } else { GRD_Studies.DisplayLayout.Bands["FK_TBL_Collage_TBL_EducationLevel"].Hidden = true; GRD_Studies.DisplayLayout.Bands["FK_TBL_EducYear_TBL_EducationLevel"].Hidden = false; } } }
private void dgvDatos_BeforeRowUpdate(object sender, Infragistics.Win.UltraWinGrid.CancelableRowEventArgs e) { if (e.Row.Index < 0 | e.Row.IsAddRow) { return; } string msg = string.Empty; int alert = 0; using (SqlConnection connection = new SqlConnection(Datos.Clases.Constantes.conectionLog)) { using (SqlCommand command = new SqlCommand("su_Conteos", connection)) { command.CommandType = CommandType.StoredProcedure; command.Parameters.AddWithValue("@TipoConsulta", 8); command.Parameters.AddWithValue("@idConteo", e.Row.Cells["Folio"].Value); command.Parameters.AddWithValue("@isCiego", e.Row.Cells["Inv ciego"].Value); command.Parameters.AddWithValue("@Comment", e.Row.Cells["Comentarios"].Value); SqlParameter param = command.Parameters.Add("@Mensaje", SqlDbType.VarChar, 250); param.Direction = ParameterDirection.Output; SqlParameter param2 = command.Parameters.Add("@TipoAlert", SqlDbType.Int); param2.Direction = ParameterDirection.Output; connection.Open(); command.ExecuteNonQuery(); msg = Convert.ToString(param.Value); alert = Convert.ToInt32(param2.Value); this.SetMensaje(msg, 5000, alert == 1 ? Color.Red : Color.Green, alert == 1 ? Color.White : Color.Black); if (alert == 1) { clbAlmacen_SelectionChangeCommitted(sender, e); } } } }