Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Database value doesn't display in wpf combobox

$
0
0

I've messed something up but cannot figure out what.  I have a datagrid that used to display a value coming from the database just fine.  Then I changed the cell on the datagrid to a combobox.  The combo drops down with the correct items but now the combo does not display the value coming from the database.

Xaml:

<DataGridComboBoxColumn x:Name="cboDentistAppointmentTimes" Header="Appointment Time" TextBinding="{Binding DentistAppointmentTime}" />


Code to bind combo:

        Dim AppointmentTimes As New List(Of String)() From { _"8:00", _"9:00", _"10:30" _
        }

        cboDentistAppointmentTimes.ItemsSource = AppointmentTimes

When the datagrid is displayed, no values from the database are displayed.  The cell is blank.  How do I get that value back?

Thanks.


Kris Hood


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>