Using AddRange in a ListView When you have a custom collection and want to add 2 columns (properties) of the collection Items to the ListView
Preferably do this via Telerik ListView
a similar code- it is not correct because of this line :
ListViewDataItem(wi.Name, wi.ID)
I want a better approach if possible
ListViewDataItem[] elements ;
ListViewDataItem lvi;
int c = 0 ;
Collection.ForEach(wi =>
{
lvi = new ListViewDataItem(wi.Name, wi.ID);
elements[c] = lvi ;
c += 1 ;
//LvCollection.Items.Add(wi.Name, wi.ID);
});
LvCollection.Items.AddRange(elements);
thanks,
any help would be appreciated
Just a guess, but looking at the Telerik documentation something like
or