J
John Smith
Hey folks,
I've got a combobox (DropDown List) in a windows form application which is
bound to a DataSet.
It's value is set to a numeric ID. It's visible text is set to a date. I
need to make it so that the first item shows the words "Most Recent" instead
of the date.
I've tried setting the SelectedItem, Text, and SelectedText of the list box
to "Most Recent", when the SelectedIndex changes to 0, but nothing happens.
I also tried changing it in the dataset before (and after) it is bound, by
doing
ds.Tables[0].Rows[0].ItemArray[1] = "Most Recent", but that does nothing
either. It always displays the date instead. I think it may be related to
the fact that the ValueType in the DataSet is a DateTime.
Any idea how to accomplish this?
I've got a combobox (DropDown List) in a windows form application which is
bound to a DataSet.
It's value is set to a numeric ID. It's visible text is set to a date. I
need to make it so that the first item shows the words "Most Recent" instead
of the date.
I've tried setting the SelectedItem, Text, and SelectedText of the list box
to "Most Recent", when the SelectedIndex changes to 0, but nothing happens.
I also tried changing it in the dataset before (and after) it is bound, by
doing
ds.Tables[0].Rows[0].ItemArray[1] = "Most Recent", but that does nothing
either. It always displays the date instead. I think it may be related to
the fact that the ValueType in the DataSet is a DateTime.
Any idea how to accomplish this?