// Thread safe adding of subitem to list control private void AddSubItem(System.Windows.Forms.ListView control, int item, string subitemText) { if (control.InvokeRequired) { AddSubItemCallback d = new AddSubItemCallback(AddSubItem); Invoke(d, new object[] { control, item, subitemText }); } else { control.Items[item].SubItems.Add(subitemText); } }
private void addSolutionToEstimatedColumn(System.Windows.Forms.ListView control, int item, string itemTxt) { if (control.InvokeRequired) { AddSubItemCallback d = new AddSubItemCallback(addSolutionToEstimatedColumn); Invoke(d, new object[] { control, item, itemTxt }); } else { control.Items[item].SubItems.Add(itemTxt); } }