ComboBox: setting display format on DisplayMember
- From: "Vanya" <Vanya@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 9 Jun 2005 15:25:04 -0700
Hello,
I have a ComboBox bound to a DataView as:
myCombo.DataSource = myDataView.
myComboBox.DisplayMember is set to a column from the view which has data
stored in decimal format.
I want the data I pull from this column to display in the ComboBox as
decimalValue.ToString("c") - e.g. formatted as currency. For example, if I
have values 1, 2, and 3 in the column, they currently get loaded as:
1.0000
2.0000
3.0000
in the ComboBox. I want them to display as:
$1.00
$2.00
$3.00
I can't seem to find clean and simple way to accomplish this :(. Any
suggestions will be greatly appreciated.
Thank you!
.
- Prev by Date: Re: Text wrapping on a command button
- Next by Date: Re: Text wrapping on a command button
- Previous by thread: Suppress toolbox icon
- Next by thread: Re: Selected ListBox Item Text
- Index(es):
Loading