private void SfDataGrid1_CellClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e) { if (e.DataRow.RowIndex >= 1) { DisableButtons(); var rowData = sfDataGrid1.GetRecordAtRowIndex(e.DataRow.RowIndex); var propertyCollection = sfDataGrid1.View.GetPropertyAccessProvider(); var id = propertyCollection.GetValue(rowData, "ID").ToString(); var ssn = propertyCollection.GetValue(rowData, "SSN").ToString(); var dod = propertyCollection.GetValue(rowData, "DOD").ToString(); var intId = int.Parse(id); if (!string.IsNullOrEmpty(textBox1.Text) && textBox1.Text != id) { var oldId = int.Parse(textBox1.Text); SetUse(oldId, EnvMethods.GetCurrentUser(), true); } if (DbInteractions.CheckMethods.RecordInUseBy(intId, EnvMethods.GetCurrentUser()) == string.Empty) { SetUse(intId, EnvMethods.GetCurrentUser(), false); textBox1.Text = id; textBox2.Text = ssn; textBox3.Text = dod; GetObitExtras(intId); if (string.IsNullOrEmpty(dod)) { textBox3.ReadOnly = false; } else { textBox3.ReadOnly = true; } var pdQuery = "SELECT AVSRecNo, DateRecd, DOB, PatFName as FName, PatMName as MName, PatLName as LName, ViatorState as 'State', " + "PatientType as Diagnosis, Mortality as '%', PredictionMths AS 'LE', prediction as Comments FROM PersonalData WHERE SSN LIKE @VAL ORDER BY AVSRecNo DESC"; var cmd = new SqlCommand(cmdText: pdQuery); cmd.Parameters.Add("@VAL", SqlDbType.VarChar).Value = ssn; FillDataGrid(cmd, sfDataGrid2, false); } else { CheckUseStatus(intId); } EnableButtons(); } }
private void environmentsGrid_CellDoubleClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e) { environmentForm environment = new environmentForm((Logic.Environment)e.DataRow.RowData); if (environment.ShowDialog() == DialogResult.OK) { Configuration.Parameters.Remove(Configuration.Parameters.Where(p => p.Key == string.Format("ENV|{0}", ((Logic.Environment)e.DataRow.RowData).Name)).FirstOrDefault()); Configuration.Parameters.Add(new KeyValuePair <string, object>(string.Format("ENV|{0}", environment.GetEnvironment().Name), environment.GetEnvironment())); PopulateEnvironmentsGrid(); } }
private void sfDataGridBuquedaProducto_CellDoubleClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e) { try { this.AgregarRegistro(); } catch (Exception ex) { ErrorLogHelper.AddExcFileTxt(ex, " FrmBusquedaProducto() ~ sfDataGridBuquedaProducto_CellDoubleClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e)"); CIDMessageBox.ShowAlert(Messages.SystemName, Messages.ErrorBusqueda, TypeMessage.error); } }
private void DataGridBuscarCompras_CellDoubleClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e) { try { this.SeleccionarRegistro(); } catch (Exception ex) { ErrorLogHelper.AddExcFileTxt(ex, "FrmBuscarCompras() ~ DataGridBuscarCompras_CellDoubleClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e)"); CIDMessageBox.ShowAlert(Messages.SystemName, Messages.ErrorFormulario, TypeMessage.error); } }
private void sfDataGrid_CellDoubleClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e) { // Get the row index value var rowIndex = e.DataRow.RowIndex; //Get the cell value var cellValue = this.sfDataGrid.View.GetPropertyAccessProvider().GetValue(e.DataRow.RowData, "ID"); STUDENT_ID = Convert.ToInt32(cellValue); ViewStudent viewStudent = new ViewStudent(); viewStudent.ShowDialog(); }
void sfDataGrid_CellClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e) { if (e.DataRow.RowType == RowType.HeaderRow && this.sfDataGrid.View.TopLevelGroup == null) { var firstRowDate = this.sfDataGrid.View.Records[0]; var lastRowData = this.sfDataGrid.View.Records[this.sfDataGrid.View.Records.Count - 1]; var column = e.DataColumn.GridColumn; if (firstRowDate != null && lastRowData != null) { this.sfDataGrid.ClearSelection(); this.sfDataGrid.SelectCells(firstRowDate, column, lastRowData, column); } } }
private void sfDataGrid1_CellDoubleClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e) { try { var item = ObtenerSeleccionado(); if (item != null) { proveedor = item; this.Close(); } else { CIDMessageBox.ShowAlert(Messages.SystemName, Messages.GridSelectMessage, TypeMessage.informacion); } } catch (Exception ex) { ErrorLogHelper.AddExcFileTxt(ex, "FrmProveedorACompra ~ BtnSeleccionar_Click(object sender, EventArgs e)"); CIDMessageBox.ShowAlert(Messages.SystemName, Messages.ErrorMessage, TypeMessage.error); } }
private void DtgClientes_CellDoubleClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e) { try { var item = ObtenerSeleccionado(); if (item != null) { cliente = item; this.DialogResult = DialogResult.OK; this.Close(); } else { CIDMessageBox.ShowAlert(Messages.SystemName, Messages.GridSelectMessage, TypeMessage.informacion); } } catch (Exception ex) { ErrorLogHelper.AddExcFileTxt(ex, "FrmSelectCliente ~ DtgClientes_CellDoubleClick(object sender, EventArgs e)"); CIDMessageBox.ShowAlert(Messages.SystemName, Messages.ErrorMessage, TypeMessage.error); } }
private void _view_OnDataGridCellDoubleClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e) { _view_OnDetailClick(null, null); }
private void sfDataGridCliente_CellDoubleClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e) { btnGuardar_Click(sender, e); }
private void dgmCitasSinAgendar_CellDoubleClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e) { btnSeleccionar_Click(sender, e); }
private void GridNombresTurnos_CellDoubleClick(object sender, Syncfusion.WinForms.DataGrid.Events.CellClickEventArgs e) { BtnModificar_Click(sender, e); }