Set default value of ComboBox in grouping DataGrid
I have this,
Now, I need to set the default value of my ComboBox, (i.e., to the first value of my database table). I have tried to do this manually, ComboScanner.Text = ""
, however, I get an error saying:
开发者_JS百科Could not find 'ComboScanner'.
I am wondering if this is because I am using a DataTemplate, if not, how can I solve this?
Have you tried setting your ComboBox's SelectedIndex = 0
?
<ComboBox Name="ComboScanner" SelectedIndex="0" ... />
精彩评论