I have a checkedlistbox that's bound to a generic list of custom type. When I remove other items on the list, the display is okay, but when I remove the last item on the list, the list shows up w/ the type name instead of the displayname.
_selResolutions.RemoveAt(selIndex);
cklResolutions.DataSource = null;
cklResolutions.BeginUpdate();
cklResolutions.DataSource = _selResolutions;
cklResolutions.DisplayMember = "LongDesc";
cklResolutions.ValueMember = "LongDesc";
cklResolutions.EndUpdate();
for (var i = 0; i < _selResolutions.Count; i++)
{
cklResolutions.SetItemChecked(i, _selResolutions[i].Selected);
}
the display looks like this when the last item is removed w/ the above code.
[ ] Resolution
[ ] Resolution
[ ] Resolution
[ ] Resolution
[ ] Resolution
why is this happening? am i missing something here? how do i correct this?