I have a simple code but this is not working how to fix this issue the thread is running but listview is not updating what is the problem can anyone just explain it?
public Form1()
{
InitializeComponent();
listView1.View = View.Details;
listView1.FullRowSelect = true;
listView1.Columns.Add("Problems", 80);
listView1.Columns.Add("Data", 120);
listView1.Columns.Add("Registry Key", 130);
listView1.Columns.Add("users", 80);
Thread childThread = new Thread(getlist);
childThread.Start();
}
public void getlist()
{
int i;
for (i = 0; i < 40; i++)
{
add("a", "b", "c", "d");
}
}
public void add(string prob, string reg, string data, string user)
{
String[] row = { prob, reg, data, user };
ListViewItem item = new ListViewItem(row);
ListViewItem v = listView1.Items.Add(item);
item.Checked = true;
}