本文整理汇总了C#中System.Windows.Forms.DataGridViewRowEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# DataGridViewRowEventArgs类的具体用法?C# DataGridViewRowEventArgs怎么用?C# DataGridViewRowEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DataGridViewRowEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了DataGridViewRowEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: dataGridView1_UserAddedRow
private void dataGridView1_UserAddedRow(object sender, DataGridViewRowEventArgs e)
{
if (dataGridView1.Rows.Count == 12) {
dataGridView1.AllowUserToAddRows = false;
MessageBox.Show("Solo puedes agregar 11 elementos a la tabla.", "Advertencia", MessageBoxButtons.YesNo, MessageBoxIcon.Stop);
}
}
示例2: tablaDatos_UserAddedRow
private void tablaDatos_UserAddedRow(object sender, DataGridViewRowEventArgs e)
{
tablaDatos.Rows[tablaDatos.Rows.Count - 1].ReadOnly = true;
for (int j = 0; j < tablaDatos.Columns.Count; j++)
tablaDatos.Rows[tablaDatos.Rows.Count - 1].Cells[j].Style.BackColor = Color.Gray;
}
示例3: dtgUnidadesMedida_UserAddedRow
private void dtgUnidadesMedida_UserAddedRow(object sender, DataGridViewRowEventArgs e)
{
if (e.Row.IsNewRow)
{
((List<UnitMeasureModel>)((BindingSource)dtgUnidadesMedida.DataSource).DataSource)[e.Row.Index - 1].Id = Guid.NewGuid();
((List<UnitMeasureModel>)((BindingSource)dtgUnidadesMedida.DataSource).DataSource)[e.Row.Index - 1].IsNewRegister = true;
}
}
示例4: dtgTiposIdentificacion_UserAddedRow
private void dtgTiposIdentificacion_UserAddedRow(object sender, DataGridViewRowEventArgs e)
{
if (e.Row.IsNewRow)
{
((List<IdentificationTypeModel>)((BindingSource)dtgTiposIdentificacion.DataSource).DataSource)[e.Row.Index - 1].Id = Guid.NewGuid();
((List<IdentificationTypeModel>)((BindingSource)dtgTiposIdentificacion.DataSource).DataSource)[e.Row.Index - 1].IsNewRegister = true;
}
}
示例5: dtgImpuestos_UserAddedRow
private void dtgImpuestos_UserAddedRow(object sender, DataGridViewRowEventArgs e)
{
if (e.Row.IsNewRow)
{
((List<TaxModel>)((BindingSource)dtgImpuestos.DataSource).DataSource)[e.Row.Index - 1].Id = Guid.NewGuid();
((List<TaxModel>)((BindingSource)dtgImpuestos.DataSource).DataSource)[e.Row.Index - 1].IsNewRegister = true;
}
}
示例6: dgidGroup_UserAddedRow
private void dgidGroup_UserAddedRow(object sender, DataGridViewRowEventArgs e)
{
var a = e.Row.DataBoundItem;
if(a is ProductGroup)
{
}
}
示例7: OnUserDeletedRow
protected override void OnUserDeletedRow(DataGridViewRowEventArgs e)
{
if (e.Row != null && mQueueDeleteEvents)
{
mDeletedRows++;
}
base.OnUserDeletedRow(e);
}
示例8: dataGridView_DefaultValuesNeeded
private void dataGridView_DefaultValuesNeeded(object sender, DataGridViewRowEventArgs e)
{
e.Row.Cells["id"].Value = (Int64)DataBaseDriver.Instance.ProductsDataTable.Rows[DataBaseDriver.Instance.ProductsDataTable.Rows.Count - 1]["id"] + 1;
e.Row.Cells["prime_cost"].Value = 0;
e.Row.Cells["price"].Value = 0;
e.Row.Cells["category_id"].Value = 1;
e.Row.Cells["is_removed"].Value = 0;
}
示例9: dgvPlayers_DefaultValuesNeeded
private void dgvPlayers_DefaultValuesNeeded(object sender, DataGridViewRowEventArgs e)
{
Player newPlayer = new Player()
{
Name = "Write name";
Wins
}
}
示例10: dgDepartmentss_UserAddedRow
private void dgDepartmentss_UserAddedRow(object sender, DataGridViewRowEventArgs e)
{
int id = Convert.ToInt32(departmentClient.CallSyncMethod("InsertDepartment", Guid.NewGuid().ToString()));
var rowIndex = dgDepartments.Rows.IndexOf(e.Row);
dgDepartments.Rows[rowIndex].Tag = id;
}
示例11: dataGridView2_UserAddedRow
private void dataGridView2_UserAddedRow(object sender, DataGridViewRowEventArgs e)
{
if (dtgBXTrungGian.Rows.Count > 2)
dtgBXTrungGian.AllowUserToAddRows = false;
{
dtgBXTrungGian.Rows[dtgBXTrungGian.RowCount - 1].Cells[0].Value = "";
dtgBXTrungGian.Rows[dtgBXTrungGian.RowCount - 1].Cells[1].Value = "";
}
}
示例12: gridLineDataGridView1_DefaultValuesNeeded
private void gridLineDataGridView1_DefaultValuesNeeded(object sender, DataGridViewRowEventArgs e)
{
// Default Enabled and Pass Execution Context to true
//e.Row.Cells["Enabled"]
//formEvent.Enabled = true;
//formEvent.PassExecutionContext = true;
e.Row.Cells[scriptDataGridViewTextBoxColumn.Name].Value = Scripts.Last().Name;
e.Row.Cells[IsEnabled.Name].Value = true;
e.Row.Cells[PassExecutionContext.Name].Value = true;
}
示例13: dataGridViewImages_UserDeletedRow
private void dataGridViewImages_UserDeletedRow(object sender, DataGridViewRowEventArgs e)
{
Validate();
//signatureCounterDataSet1.Clear();
tables.UpdateAll(signatureCounterDataSet1);
tables.SignatureTableAdapter.Fill(signatureCounterDataSet1.Signature);
ShowSignatureList();
ShowSelectedImage();
ShowTrimmingRectangle();
}
示例14: OnRowHeightChanged
protected override void OnRowHeightChanged(DataGridViewRowEventArgs e)
{
// Bug 242.
try
{
base.OnRowHeightChanged(e);
}
catch (InvalidOperationException)
{
}
}
示例15: dataG_UserDeletedRow
private void dataG_UserDeletedRow(object sender, DataGridViewRowEventArgs e)
{
DialogResult dialogResult = MessageBox.Show("Вы действительно хотите удалить эту запись?", "Внимание!", MessageBoxButtons.YesNo);
if (dialogResult == DialogResult.Yes)
{
string id = e.Row.Cells[0].Value.ToString();
db.FetchAllSql("DELETE FROM `regs` WHERE id = '" + id + "'");
loadit();
}
}