I have a problem.. I have this code:
private delegate void UpdateColumnDelegate(object sender, int cid = 0, int status = 0);
public void UpdateColumn(object sender, int cid = 0, int status = 0)
{
if (this.InvokeRequired)
{
this.Invoke(new UpdateColumnDelegate(UpdateColumn), new object[] { cid, status });
}
if (status == 0)
{
var res = "Failed";
listView1.Items[cid].SubItems.Add(res);
}
else if (status == 1)
{
var res = "Successful";
listView1.Items[cid].SubItems.Add(res);
}
}
And somehow when I run it it doesn't work.. it doesn't update listview and when all items are done.. program just hangs.. So please help me out, what I'm doing wrong.


Sign In
Create Account

Back to top









