I am trying to add a row to listView
listView1.Items.AddRange(new ListViewItem[] { item1 });
from another thread to the one in which it was created, and it throws an exception.
Can someone help me figure out how to do this correctly?
You can use Control.Invoke() to execute your code back in the user interface thread:
Control.Invoke()
listView1.Invoke( new MethodInvoker(delegate(){ listView1.Items.AddRange(new ListViewItem[] { item1 }; );