J
JereBerar
Guest
Hi Gang
I’m using linq to sql:
This line says - ListView does bot contain a definition for items
ListView.items.Add(item);
private void button1_Click(object sender, EventArgs e)
{
Cursor.Current = Cursors.WaitCursor;
using(DbBaseballDataContext db = new DbBaseballDataContext())
{
List<Batting> list = db.Battings.ToList();
foreach(Batting b in list)
{
ListViewItem item = new ListViewItem(b.Id.ToString());
item.SubItems.Add(b.NAME);
item.SubItems.Add(b.POS.ToString());
ListView.items.Add(item); // Error Here
}
Cursor.Current = Cursors.Default;
}
}
Thanks for any help
JereTheBear
Continue reading...
I’m using linq to sql:
This line says - ListView does bot contain a definition for items
ListView.items.Add(item);
private void button1_Click(object sender, EventArgs e)
{
Cursor.Current = Cursors.WaitCursor;
using(DbBaseballDataContext db = new DbBaseballDataContext())
{
List<Batting> list = db.Battings.ToList();
foreach(Batting b in list)
{
ListViewItem item = new ListViewItem(b.Id.ToString());
item.SubItems.Add(b.NAME);
item.SubItems.Add(b.POS.ToString());
ListView.items.Add(item); // Error Here
}
Cursor.Current = Cursors.Default;
}
}
Thanks for any help
JereTheBear
Continue reading...