Lerroy Fernandes

Lerroy Fernandes

  • NA
  • 17
  • 10.6k

How to disable add button until all data fields are entered

Feb 8 2021 3:16 PM
Hi I have a question where i need a check on all datainputfields, fields include textbox 1-9 and a picturebox 1.
 
I cannot seem to handle the check. 
 
Request help. so at present this is the code for onclick, how do I add a check on click? 
 
private void button2_Click(object sender, EventArgs e)
{
MemoryStream mmst = new MemoryStream();
pictureBox1.Image.Save(mmst, pictureBox1.Image.RawFormat);
byte[] img = mmst.ToArray();
dataGridView1.Rows.Add(textBox1.Text, textBox2.Text, textBox3.Text, textBox4.Text, textBox5.Text,
textBox6.Text, textBox7.Text, textBox8.Text, img);
 

Answers (1)