Really easy combobox question

  • Thread starter Thread starter Michael Rodriguez
  • Start date Start date
M

Michael Rodriguez

I have a table that has a field called FinancialType. It has two possible
values, F and S, which stand for Financial and Statistical, respectively.

What I want is a ComboBox that has two drop down choices, Financial and
Statistical, each of which are bound to the values of F and S in my table.
I must be missing something really easy, because I can't figure out how to
get this to work.

This was so easy in Delphi...

TIA,

Mike Rodriguez
 
Hi Mike,

There might be better ways, but if you have a ComboBox with F and S from a
bound table, you could set DrawMode to one of the ownerdrawn ones and
paint (drawstring) Financial and Statistical in the DrawItem event (PS!
set DropDownStyle to list to ensure you also get to draw the EditBox item).

There is also the ValueMember and DisplayMember (See the sample in
ListControl.DisplayMember), but that assumes you have a field with
Financial and Statistical as well as F and S.
 
Back
Top