C# WPF Listview Subitems
Как равномерно можно распределить данные по листвью?
есть массив:
string[] lines = {'one', 'one1', 'one2', 'two', 'two1', 'two2', 'three', 'three1', 'three2'};
есть listview with 3 columns
нужно:
column1 = one
column2 = one1
column3 = one2 и т. д.
int ncount1 = 0;
int ncount2 = 1;
int ncount3 = 2;
for (int i = 0; i < lines .Length; i++)
{
listview .Items.Add(new { column1 = lines[ncount1 ] , column2= lines[ncount2 ], column3= lines[ncount3] });
ncount1 +=ncount3 ; //
ncount2 +=ncount3 ; // на ум больше ничего не приходить (
ncount3 +=ncount3 ; //
}
Подскажите пожалуйста
присвоил массив к двумерному, проблема решилась