开发者

Setting the SelectedItemIndex in a DataGridCombobBoxColumn

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜