I have 2 forms. Form 1 which shows a ListView and Form 2 a button called button1. What I'm trying to do is when the button on form 2 is clicked. I want it to fill the Listview on form1.
The listview has 3 columns; Flavour Quantity Sub-Total
When the button1 is pressed, it should show Vanilla, 1, £1.00 in the listview on form1.
I'm able to do this if the listview is on the same form as the button, but not if it's on different forms.
Form1
public partial class form1: Form
{
public form1()
{
InitializeComponent();
}
Form2
public partial class form2: Form
{
public form2()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
ListViewItem lvi = new ListViewItem("Vanilla");
lvi.SubItems.Add("1");
lvi.SubItems.Add("£1.00");
listView1.Items.Add(lvi);
}