combobox

  • Thread starter Thread starter Xabi
  • Start date Start date
X

Xabi

Hello.

Is there in cf a property for combobox like ITEMDATA in evb?

I am trying to assign a code to each item in combobox but I cannot.


Thanks
 
You're right, there's no ItemData property in CF, but you
can easily workaround that by creating a item as a class
with any properties and override ToString() method in it.
Something like that:

class Item
{
public string Name;
public int AccountNumber;

public override string ToString()
{
return Name;
}
}


And now you can use this class as a part of any array and
assign it to DataSource property of a Combobox or you can
just pass to the ComboBox.Items.Add(...) method.

HTH... Alex
 
Back
Top