0

This is WinForms..

I have a for loop:

private void MagicBtnClick(object sender, EventArgs e)
{
   foreach (var auras in GetBuffs())
   {
      var i = new ListViewItem(auras.ToString(), 0);
      listView1.Items.AddRange(new[] { i });
   }
}

I want to add a simple Subitem(I get the value from a textbox) to a selected item on the list.

Anyone have any suggestions?

1 Answer 1

1

listView1.SelectedItems[0].SubItems.Add("4"); Solved it

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.