public void Endupdate(TaskInfo info) { EXListView iTaskList = TaskList[info.Group]; if (iTaskList.InvokeRequired) { UpdateTaskList updatedelegate = new UpdateTaskList(Endupdate); ParentForm.Invoke(updatedelegate, new object[] { info }); } else { ListViewItem foundItem = iTaskList.FindItemWithText(info.Card, false, 0); //参数1:要查找的文本;参数2:是否子项也要查找;参数3:开始查找位置 for (int i = 4; i < iTaskList.Columns.Count; i++) { EXControlListViewSubItem subitem = foundItem.SubItems[i] as EXControlListViewSubItem; iTaskList.RemoveControlFromSubItem(subitem); } iTaskList.Items.Remove(foundItem); } }
private void btn_Click(object sender, EventArgs e) { lstv.RemoveControlFromSubItem((EXControlListViewSubItem)lstv.Items[1].SubItems[4]); }