how to fill item with more than 2 columns in ListViewComboBox

0
0

Dear All

I am try to implement LisviewCombobox with 3 columns.

When i want to add value to column 3 ,i had trouble (don’t know how to do it).

If 2 column, i just using this code

ListviewCombox.Items.Add(“value_column1”).SubItems.Add(“value_column2”)

 

Thanks for your help

Nicky

 

  • You must to post comments
0
0

Hi Fu,

All you need is another SubItem!

In your case, the line of code you added could be modified to be something like:

ListviewCombox.Items.Add(“value_column1”).SubItems.Add(new ListViewItem("value_column2"){SubItems = new ListViewItem[]{new ListViewItem("value_column3")});

Or as another example:

ListviewCombox.Items.Add(“value_column1”).SubItems.Add("value_column2");
Var subItem = ListviewCombobox.Items[index].SubItems[0];
subItem.SubItems.Add("value_column3");

HTH,
Alaa

  • fu min
    Thanks Alaa for quick respon Can you give me example in VB.Net code
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.