Good morning, my problem is that I'm working on a project, where I'm using DataGrids
and I run into a problem:
The user enters information in textbox
give "add" and generates a row with the information of textboxs
, now what I want to do is that for each row created fill me in the column empty with the data of a textbox
fixed (Is another button not the one to add) How could you do it?
This is the code of the "Add" button:
{
if (descuento.Text == string.Empty)
{
descuento.Text = "0";
}
dataGridView1.Rows.Add(prodcod.Text, articulo.Text, unidad.Text, preciou.Text, cantidad.Text, subtotal.Text, descuento.Text, total.Text);
prodcod.Clear();
articulo.Clear();
unidad.Clear();
preciou.Clear();
cantidad.Clear();
subtotal.Clear();
descuento.Clear();
total.Clear();
prodcod.Focus();
}