private void SssShowToolTip(string text) { SSSPopup.Show(text, SSSGRD, new Point( SSSGRD.GetCellDisplayRectangle(SSSGRD.CurrentCell.ColumnIndex, SSSGRD.CurrentCell.RowIndex, true).X + 30, SSSGRD.GetCellDisplayRectangle(SSSGRD.CurrentCell.ColumnIndex, SSSGRD.CurrentCell.RowIndex, true).Y + 20)); SSSGRD.CurrentCell.Value = _currentval; }
private void TaxShowToolTip(string text) { SSSPopup.Show(text, TaxExemptionGRD, new Point( TaxExemptionGRD.GetCellDisplayRectangle(TaxExemptionGRD.CurrentCell.ColumnIndex, TaxExemptionGRD.CurrentCell.RowIndex, true).X + 50, TaxExemptionGRD.GetCellDisplayRectangle(TaxExemptionGRD.CurrentCell.ColumnIndex, TaxExemptionGRD.CurrentCell.RowIndex, true).Y + 40), 1500); TaxExemptionGRD.CurrentCell.Value = _currentval; }
private void SssDataVal() { SSSPopup.Hide(SSSGRD); if (!_currentval.Equals(SSSGRD.CurrentCell.Value.ToString())) { double value; if (!double.TryParse(SSSGRD.CurrentCell.Value.ToString(), out value)) { SssShowToolTip("Enter a valid number"); } else { SSSGRD.CurrentCell.Value = value.ToString("N2"); if ( SSSGRD.CurrentCell.ColumnIndex == 3 && double.Parse(SSSGRD.CurrentCell.Value.ToString()) <= double.Parse(SSSGRD.Rows[SSSGRD.CurrentCell.RowIndex].Cells[1].Value.ToString())) { SssShowToolTip("Please enter a value higher than the starting range"); } else if ( SSSGRD.CurrentCell.RowIndex != SSSGRD.Rows.Count - 1 && SSSGRD.CurrentCell.ColumnIndex == 3 && double.Parse(SSSGRD.CurrentCell.Value.ToString()) >= double.Parse(SSSGRD .Rows[SSSGRD.CurrentCell.RowIndex + 1].Cells[1].Value.ToString())) { SssShowToolTip("Please enter a value lower than the next range"); } else if ( SSSGRD.CurrentCell.RowIndex != 0 && !_currentval.Equals("00.00") && SSSGRD.CurrentCell.ColumnIndex == 1 && double.Parse(SSSGRD.CurrentCell.Value.ToString()) <= double.Parse(SSSGRD .Rows[SSSGRD.CurrentCell.RowIndex - 1].Cells[3].Value.ToString())) { SssShowToolTip("Please enter a value higher than the previous range"); } else if ( SSSGRD.CurrentCell.ColumnIndex == 1 && !SSSGRD.Rows[SSSGRD.CurrentCell.RowIndex].Cells[3].Value .ToString().Equals("00.00") && double.Parse(SSSGRD.CurrentCell.Value.ToString()) >= double.Parse(SSSGRD.Rows[SSSGRD.CurrentCell.RowIndex].Cells[3].Value.ToString())) { SssShowToolTip("Please enter a value lower than the ending range"); } else if ( SSSGRD.CurrentCell.ColumnIndex == 5 && SSSGRD.CurrentCell.RowIndex != 0 && double.Parse(SSSGRD.CurrentCell.Value.ToString()) <= double.Parse(SSSGRD.Rows[SSSGRD.CurrentCell.RowIndex - 1].Cells[5].Value.ToString())) { SssShowToolTip("Please enter a value higher than the previous amount"); } else if ( SSSGRD.CurrentCell.ColumnIndex == 5 && SSSGRD.CurrentCell.RowIndex != SSSGRD.Rows.Count - 1 && double.Parse(SSSGRD.CurrentCell.Value.ToString()) >= double.Parse(SSSGRD.Rows[SSSGRD.CurrentCell.RowIndex + 1].Cells[5].Value.ToString())) { SssShowToolTip("Please enter a value lower than the next amount"); } else { if (!InRange()) { EditingMode(true); } } } } }