本文整理汇总了C#中CellEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# CellEventArgs类的具体用法?C# CellEventArgs怎么用?C# CellEventArgs使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CellEventArgs类属于命名空间,在下文中一共展示了CellEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CellEventArgsWithNullLocation
public void CellEventArgsWithNullLocation()
{
CellEventArgs args = new CellEventArgs(null);
Assert.IsTrue(args.Cell == null);
Assert.IsTrue(args.Loc == Location.Null);
}
示例2: CellEventArgsPropertiesSet
public void CellEventArgsPropertiesSet()
{
Cell cell = new Cell(new Location(0, 0));
CellEventArgs args = new CellEventArgs(cell);
Assert.IsTrue(args.Cell == cell);
Assert.IsTrue(args.Cell.Location == cell.Location);
Assert.IsTrue(args.Loc == cell.Location);
}
示例3: ultraGrid1_CellChange
private void ultraGrid1_CellChange(object sender, CellEventArgs e)
{
if (e.Cell.Column.Key == "CHK")
{
if (Convert.ToBoolean(e.Cell.Value)==false)
{
e.Cell.Value = "True";
}
}
}
示例4: dgv_DanhSach_CellChange
private void dgv_DanhSach_CellChange(object sender, CellEventArgs e)
{
try
{
if (e.Cell.Column.Key != "Chon") return;
var b = bool.Parse(e.Cell.Row.Cells["Chon"].Text);
e.Cell.Row.Appearance.BackColor = b ? Color.LightCyan : Color.White;
}
catch (Exception ex)
{
Log2File.LogExceptionToFile(ex);
}
}
示例5: listaClickCellButton
private void listaClickCellButton(object sender, CellEventArgs e)
{
if (e.Cell.Column.Key == "DeleteColumn" && e.Cell.Row.ListObject != null)
{
if (CommonMessages.DisplayConfirm("Sei sicuro di voler eliminare la attività?") == DialogResult.Yes)
{
var attDTO = (AttivitaDTO)e.Cell.Row.ListObject;
if (attDTO.ID > 0)
{
if (e.Cell.Row.Delete())
getPraticaService().DeleteAttivita(attDTO.ID);
}
}
}
}
示例6: ultraGrid1_AfterCellUpdate
private void ultraGrid1_AfterCellUpdate(object sender, CellEventArgs e)
{
try
{
if (e.Cell.Column.Key.Equals("CHECKED"))
{
if (Convert.ToBoolean(e.Cell.Value))
{
this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_NUMBER"].Value = this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GP_TOTALCOUNT"].Value;
this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_WEIGHT"].Value = this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_JJ_WEIGHT"].Value;
this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_WEIGHT_LL"].Value = this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_JJ_WEIGHT_LL"].Value;
string strWeight = Convert.ToString(this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_WEIGHT"].Value).Trim();
if (string.IsNullOrEmpty(strWeight) || strWeight == "0")
{
this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_WEIGHT"].Value = this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_WEIGHT_LL"].Value;
}
CommonMethod.SetUltraGridActiveCell(ref ultraGrid1, e.Cell.Row.Index, "FN_GPYS_NUMBER", true);
}
else
{
this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_NUMBER"].Value = "";
this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_WEIGHT"].Value = ""; ;
this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_WEIGHT_LL"].Value = "";
}
}
else if (e.Cell.Column.Key.Equals("FS_DJH") || e.Cell.Column.Key.Equals("FN_GPYS_WEIGHT"))
{
string strValue = Convert.ToString(e.Cell.Value).Trim();
if (!Convert.ToBoolean(ultraGrid1.Rows[e.Cell.Row.Index].Cells["CHECKED"].Value) && !string.IsNullOrEmpty(strValue))
{
e.Cell.Value = "";
return;
}
}
else if (e.Cell.Column.Key.Equals("FN_GPYS_NUMBER"))
{
string strCount = Convert.ToString(e.Cell.Value).Trim();
if (!Convert.ToBoolean(ultraGrid1.Rows[e.Cell.Row.Index].Cells["CHECKED"].Value) && !string.IsNullOrEmpty(strCount))
{
e.Cell.Value = "";
return;
}
string strCountLG = Convert.ToString(this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GP_TOTALCOUNT"].Value).Trim();
if (string.IsNullOrEmpty(strCount))
{
this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_WEIGHT"].Value = "";
this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_WEIGHT_LL"].Value = "";
return;
}
int iCount = 0;
int iCountLG = Convert.ToInt16(strCountLG);
if (!int.TryParse(strCount, out iCount))
{
MessageBox.Show("������������������", "��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
e.Cell.Value = iCountLG.ToString();
return;
}
if (iCount <= 0)
{
MessageBox.Show("��������������㣡", "��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
e.Cell.Value = iCountLG.ToString();
return;
}
if (iCount > iCountLG)
{
MessageBox.Show("���������ܴ�����������", "��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
e.Cell.Value = iCountLG.ToString();
return;
}
try
{
string strWeightLG = Convert.ToString(this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_JJ_WEIGHT"].Value).Trim();
if (!string.IsNullOrEmpty(strWeightLG))
{
decimal dWeightYS = Convert.ToDecimal(strWeightLG);
decimal dWeight = Math.Round(iCount * dWeightYS / iCountLG, 3);
this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_GPYS_WEIGHT"].Value = dWeight.ToString();
}
}
catch { }
try
{
string strWeightLGLL = Convert.ToString(this.ultraGrid1.Rows[e.Cell.Row.Index].Cells["FN_JJ_WEIGHT_LL"].Value).Trim();
//.........这里部分代码省略.........
示例7: ultraGrid1_CellChange
private void ultraGrid1_CellChange(object sender, CellEventArgs e)
{
try
{
if (e.Cell.Column.Key.Equals("CHECKED") || e.Cell.Column.Key.Equals("FN_GPYS_NUMBER") ||
e.Cell.Column.Key.Equals("FN_GPYS_WEIGHT") || e.Cell.Column.Key.Equals("FS_DJH"))
{
this.ultraGrid1.UpdateData();
}
}
catch { }
}
示例8: listaVersamentiCellChange
private void listaVersamentiCellChange(object sender, CellEventArgs e)
{
if (e.Cell.Row.Band.Index == 0 && e.Cell.Column.Key == "IdConto")
setSottoContoValueList(e.Cell.Row);
}
示例9: listaLettureAfterCellUpdate
private void listaLettureAfterCellUpdate(object sender, CellEventArgs e)
{
if (e.Cell.Row.IsDataRow && e.Cell.Row.ListObject is LetturaContatoreDTO)
{
}
}
示例10: GrillaBancos_ClickCellButton
private void GrillaBancos_ClickCellButton(object sender, CellEventArgs e)
{
ItemSocioNegocioBanco Item = (ItemSocioNegocioBanco)e.Cell.Row.Tag;
switch (e.Cell.Column.Key)
{
case colMoneda:
FrmSelectedEntity FrmSeleccionarPanel = new FrmSelectedEntity();
Moneda moneda = (Moneda)FrmSeleccionarPanel.GetSelectedEntity(typeof(Moneda), "Moneda");
Item.Moneda = moneda;
break;
default:
break;
}
this.MostrarBanco(e.Cell.Row);
}
示例11: myCellClickOnAjax
private String myCellClickOnAjax(object sender, CellEventArgs e)
{
return "hello" + e.Cell.StringValue+".row:"+e.Cell.Row+",col:"+e.Cell.Column;
}
示例12: ultraGrid1_ClickCellButton
private void ultraGrid1_ClickCellButton(object sender, CellEventArgs e)
{
UltraGridRow ugr = this.ultraGrid1.ActiveRow;
if (ugr == null) return;
MessageBox.Show(ugr.Cells["FS_PointCode"].Text.Trim());
}
示例13: listaRateClickCellButton
private void listaRateClickCellButton(object sender, CellEventArgs e)
{
if (e.Cell.Column.Key == "DeleteColumn")
{
var authMessage = getRateCondominiService().IsAllowDeleteRata(int.Parse(e.Cell.Row.Cells["ID"].Value.ToString()));
if (!string.IsNullOrEmpty(authMessage.FatalMessage))
CommonMessages.DisplayWarning("Non è possibile eliminare la rata:" + Environment.NewLine + authMessage.FatalMessage);
else
{
if (!(bool)e.Cell.Row.Cells["Eliminare"].Value)
{
e.Cell.Row.Cells["AssegnareAEntrante"].Value = false;
e.Cell.Row.Cells["Eliminare"].Value = true;
e.Cell.Row.Appearance.FontData.Strikeout = Infragistics.Win.DefaultableBoolean.True;
foreach (var cell in e.Cell.Row.Cells)
cell.Activation = Activation.NoEdit;
}
else
{
e.Cell.Row.Cells["Eliminare"].Value = false;
e.Cell.Row.Appearance.FontData.Strikeout = Infragistics.Win.DefaultableBoolean.False;
e.Cell.Row.Cells["AssegnareAEntrante"].Activation = Activation.AllowEdit;
}
setRiepilogoImporti();
}
}
}
示例14: contiClickCellButton
private void contiClickCellButton(object sender, CellEventArgs e)
{
// ===========================================
// Delete Column
// ===========================================
if (e.Cell.Column.Key == "DeletedColumn")
{
if (e.Cell.Band.Key == "ContoDTO")
{
if (e.Cell.Row.ListObject != null)
{
var conto = (ContoDTO)e.Cell.Row.ListObject;
if (!conto.Deleted)
{
if (CommonMessages.DisplayConfirm("Sei sicuro di voler cancellare il conto " + conto.DescrizioneCompleta + "?") == DialogResult.Yes)
{
if (_contiDaAggiornare.Contains(conto))
_contiDaAggiornare.Remove(conto);
if (conto.ID > 0)
{
var message = getPianoContiService().DeleteConto(conto, _esercizio);
if (!string.IsNullOrEmpty(message))
CommonMessages.DisplayWarning("Il conto non può essere eliminato:" + Environment.NewLine + message);
else
{
e.Cell.Row.Appearance.ForeColor = Color.LightGray;
conto.Deleted = true;
}
}
else
e.Cell.Row.Delete(false);
}
}
else
{
if (CommonMessages.DisplayConfirm("Sei sicuro di voler ripristinare il conto " + conto.DescrizioneCompleta + "?") == DialogResult.Yes)
{
if (_contiDaAggiornare.Contains(conto))
_contiDaAggiornare.Remove(conto);
if (conto.ID > 0)
{
var message = getPianoContiService().RipristinaConto(conto, _esercizio);
if (!string.IsNullOrEmpty(message))
CommonMessages.DisplayWarning("Si sono verificati degli errori inattesi durante il ripristino del conto:" + Environment.NewLine + message);
else
{
e.Cell.Row.Appearance.ForeColor = Color.Black;
conto.Deleted = false;
}
}
}
}
}
}
else if (e.Cell.Band.Key == "SottoConti")
{
if (e.Cell.Row.ListObject != null)
{
var sottoConto = (SottoContoDTO)e.Cell.Row.ListObject;
if (e.Cell.Row.Delete())
{
var conto = (ContoDTO)e.Cell.Row.ParentRow.ListObject;
conto.SottoConti.Remove(sottoConto);
if (sottoConto.ID > 0)
getPianoContiService().DeleteSottoConto(sottoConto, _esercizio);
}
}
}
}
// ===========================================
// Clear Esercizio
// ===========================================
if (e.Cell.Column.Key == "ClearEsercizio")
{
if (e.Cell.Band.Key == "ContoDTO")
{
if (e.Cell.Row.ListObject != null)
{
var conto = (ContoDTO)e.Cell.Row.ListObject;
conto.IdEsercizio = null;
_contiDaAggiornare.Add(conto);
}
}
}
// ===========================================
// Clear Contatore
// ===========================================
if (e.Cell.Column.Key == "ClearContatore")
{
if (e.Cell.Band.Key == "ContoDTO")
{
if (e.Cell.Row.ListObject != null)
{
var conto = (ContoDTO)e.Cell.Row.ListObject;
conto.IdContatore = null;
//.........这里部分代码省略.........
示例15: listaContiClickCellButton
private void listaContiClickCellButton(object sender, CellEventArgs e)
{
if (e.Cell.Column.Key == "DeleteColumn")
e.Cell.Row.Delete();
}