开发者

Set default value of ComboBox in grouping DataGrid

I have this,

Set default value of ComboBox in grouping DataGrid

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:

Could not find 'ComboScanner'.

开发者_JS百科

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" ... />
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜