-1
I need a help. I’m inserting items into an order using a Datagridview, in that Datagridview got the spine code, description, lot and qtda. I need to validate the column code, making sure that if I have already entered code 1, it does not re-enter code 1, meaning I cannot have repeated items in the grid.
Follow the insertion command,
Button method Inseri_Itens
private void btn_inserir_Click(object sender, EventArgs e)
{
if (txt_qtda.Text != "")
{
DGW_itens.Rows.Add(txt_codigo.Text, txt_produto.Text, cb_lote.Text, txt_fabric.Text, txt_qtda.Text, txt_numero.Text);
txt_codigo.Text = "";
txt_produto.Text = "";
cb_lote.Items.Clear();
cb_lote.Text = "";
txt_fabric.Text = "";
txt_qtda.Text = "0.00";
txt_idsolicitacao.Text = "";
btn_gravar.Enabled = true;
}
else
{
MessageBox.Show("Não existem itens a serem incuidos, por favor verifique se o campo Qtda. esta preenchido!!!");
return;
}
}
thank you in advance.
Vlw Andre gave it right here thank you very much.
– Junior Guerreiro