I am trying to use multiple textbox But I am facing a problem. The value of column automatically change as I set Autofill to that column but a differe

  • Thread starter Thread starter Saikat Paul
  • Start date Start date
S

Saikat Paul

Guest
private void DataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
if (DataGridView1.CurrentCell.ColumnIndex.Equals(1))
{
ComboBox Combo_ItemName = e.Control as ComboBox;
Combo_ItemName.SelectedIndexChanged += new EventHandler(Combo_ItemName_SelectedIndexChanged);
}

else if (DataGridView1.CurrentCell.ColumnIndex.Equals(3))
{
TextBox Quantity = e.Control as TextBox;
Quantity.TextChanged += new EventHandler(Quantity_TextChanged);

}

else if (DataGridView1.CurrentCell.ColumnIndex.Equals(5))
{
TextBox Discount = e.Control as TextBox;
Discount.TextChanged += new EventHandler(Discount_TextChanged);

}
}


Continue reading...
 
Back
Top