PropertyDescriptor information lost on data bound ComboBox when made invisible

  • Thread starter Thread starter aido
  • Start date Start date
A

aido

Hi all,
I have bound a custom list object to a combo box's data source. This object
implements the ITypedList interface and returns a
PropertyDescriptorCollection to the fields in the list object. The
appropriate list field is then selected via the ComboBox's DisplayMember
property. Everything works fine up to this point. If however the combo box
Visible property is cycled it seems to lose the property descriptor
information; the underlying list is still intact but instead of field values
in the drop down list I get the type names of the objects in the list. This
combo forms part of a cell edit in a data grid so changing it's visibility
is critical. Is this a bug or have I missed something?
Thanks in advance,
Aido.
 
Hi all,
For anybody even remotely interested I have 'solved' this problem. If you
change the 'visibility' of the offending control by setting its Bounds
property to Rectangle.Empty (i.e. shrink to 0 size) this problem does not
manifest itself (since it always remains visible albeit very small). This
could be due to my implementation of the various interfaces (I could not
find appropriate examples) but is probably not since the example in the
DataGridColumnStyle class overview changes the visibility of the hosted
DateTimePicker control in exactly this manner.
Aido.
 
Back
Top