N
nphc67
I created a custom control which simply is a data-bound ComboBox. It
has a custom property that causes an ArrayList of KeyValuePair
elements to be passed to the DataSource property. It also sets the
DisplayMember and ValueMember properties.
What's weird, is the fact that my control sometimes works fine and
sometimes it doesn't. I have no idea why, but when I put on Form1
everything is fine, while on Form2 the Items collection stays empty,
although the DataSource property contains data and it is exactly the
same data (pulled from the database in the same way) that I use in
case of Form1.
I tried to use a DataTable instead of an ArrayList, but it changed
nothing.
Does anybody have any suggestions?
has a custom property that causes an ArrayList of KeyValuePair
elements to be passed to the DataSource property. It also sets the
DisplayMember and ValueMember properties.
What's weird, is the fact that my control sometimes works fine and
sometimes it doesn't. I have no idea why, but when I put on Form1
everything is fine, while on Form2 the Items collection stays empty,
although the DataSource property contains data and it is exactly the
same data (pulled from the database in the same way) that I use in
case of Form1.
I tried to use a DataTable instead of an ArrayList, but it changed
nothing.
Does anybody have any suggestions?