_SBradley_
Freshman
I have some code that says something like:
This used to work as expected in .NET 1.0/1.1. However, since I installed 2.0 Beta 2, the 'if' part never runs; every iteration always inserts a new row, even if I've actually already inserted the specified row.
Surely, BeginUpdate/EndUpdate should only affect what's displayed, not what actually gets inserted into the ListView? Is this a bug?
Cheers.
Code:
ListView lv = ...;
lv.BeginUpdate();
foreach (piece of data)
{
if (an appropriate row already exists)
item.SubItems.Add("blah");
else
item = lv.Items.Add("blah");
}
lv.EndUpdate();
This used to work as expected in .NET 1.0/1.1. However, since I installed 2.0 Beta 2, the 'if' part never runs; every iteration always inserts a new row, even if I've actually already inserted the specified row.
Surely, BeginUpdate/EndUpdate should only affect what's displayed, not what actually gets inserted into the ListView? Is this a bug?
Cheers.