George,
Here is how you do it -
PopulateDataSet();
Binding bnd = new Binding("Text", ds.Tables[0], "date");
bnd.FormatString = "dd-MM-yy";
bnd.FormattingEnabled = true;
comboBox1.DataBindings.Add(bnd);
Now, I don't have Visual Studio 2003 installed on my machine :-/ (or any of
my machines), and I suspect that FormatString was a new fangled thing
introduced in 2.0. So this just might be a 2.0 only thing. Atleast off the
top of my head, I don't remmeber seeing a FormatString property on Binding
in framework 1.1, but I could be wrong.
Anyway, thats how you do it. And this is yet another reason I am so anxious
to have 2.0 released !! HEHE
- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
http://blogs.apress.com/authors.php?author=Sahil Malik
George P. said:
Hi,
I have a combobox bound to a smalldatetime column in a table.
The ComboBox displays all available dates.
However it displays them in long format and I want to display them in short
format.
Is this possible?