tags:

views:

63

answers:

1

I have a class that contain a List of another class, and that class contains a list of string, for example:

class A {
  public list<B> temp;
}
class B {
  public list<string> st;
}

I want to add an of list<B> in class A to one column of a ListView.

i have several list of string in one class i want to add each of lists to one clumn in listview my listview have several clumn

A: 

If the amount of the items is static, then you can create columns and name them, then iterate thru each of the List<B> items, and fill the current iterator index row with the appropriate columns by name or by column index.

But anyway I would say you do it the wrong way, since a list should be used for dynamic collections. Use typed classes instead, then set the AutoGenerateColumns property.

Shimmy