On Thu, 30 Oct 2003 04:19:57 -0800, Liz <ec******@cornw all.gov.uk> wrote:
How do I add columns ACROSS and lines down from an array
to a ListView.
ListView1.Updat e();
ListView1.Items .Clear();
ListView1.Items .Add(aClients[1].Surname);
ListView1.Items .Add(aClients[1].Forename);
**starts new line
Well, ListView1.Colum ns.Add whatever columns needed, then
something like this
foreach(row in array)
{
ListViewItem lItem = ListView1.Items .Add(row[0]);
for(int x = 1; x < rowcolumns)
{
lItem.SubItems. Add(row[x]);
}
}
or in this specific case
ListView1.Colum ns.Add(Surname) ;
ListView1.Colum ns.Add(Forename );
for(int x = 0; x < aClients.Count; x++)
{
ListViewItem lItem = ListView1.Items .Add(aClients[x].Surname);
lItem.SubItems. Add(aClients[x].Forename);
}
--
Using M2, Opera's revolutionary e-mail client:
http://www.opera.com/m2/