private void FillListView() { int i; ListViewItem item; MainListView.Items.Clear(); for (i = 0; i < PluginRequestDataCounter; i++) { item = MainListView.Items.Add(string.Format("{0,6}", Convert.ToInt32(PluginRequestData[i].CommandNumber))); item.SubItems.Add(PluginRequestData[i].CommandName); item.SubItems.Add(PluginRequestData[i].Comments); item.Tag = i; //MainListView.Items[item.Index].SubItems.Add(PluginRequestData[i].CommandName); //MainListView.Items[item.Index].SubItems.Add(PluginRequestData[i].Comments); } MainListView.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); }