1
I have two textbox. One for email and the other for notes. When the user clicks on the add button, it should be adding to my datagrid, but without success! How can I do this? As the user clicks on the add button, he has to increase the datagrid lines
Note: Using WPF
This is how I try:
public class Email{
public string email { get; set; }
public string obs { get; set; }
}
for (int i=0; i < 10; i++){
List<Email> lista = new List<Email>();
Email em = new Email();
em.email = textEmpEmail.Text;
em.obs = textEmpObs1.Text;
lista.Add(em);
dataGridEmails.ItemsSource = lista;
}
That way, it inserts 10 at a time... But I needed it to add per click, one at a time..
Thank you!
So, but I don’t know how many times the user will try to add the emails. Note: I am used WPF
– Emerson