开发者

Setting the SelectedItemIndex in a DataGridCombobBoxColumn

开发者 https://www.devze.com 2023-04-11 13:09 出处:网络
How do I set the selected it开发者_如何转开发em index from code-behind in a DataGridComboBoxColumn?Try looking into this example, I couldn\'t verify if it works but seems to http://blogs.msdn.com/b/vi

How do I set the selected it开发者_如何转开发em index from code-behind in a DataGridComboBoxColumn?


Try looking into this example, I couldn't verify if it works but seems to http://blogs.msdn.com/b/vinsibal/archive/2008/10/31/wpf-datagrid-datagridcomboboxcolumn-v1-intro.aspx


Since you already know the Row Index and Column Index this should do the trick.

DataGridView.Rows[rowindex].Cells[columnindex].Value = "1"

You can set the value not the index.

0

精彩评论

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