How to set a particular cell as selected in wpf datagrid based on the text existing in the cell?
-
2012年7月27日 9:35I have a data grid in my code, i want to show a particular cell as selected in that based on some text existing in the cells.How can i do it through backend code using c#
Gmk
すべての返信
-
2012年7月27日 14:31
hi,
in the following way , you can select the cell
DataGridCell cell = GetCell(rowIndex, colIndex);
cell.Focus;
See, http://forums.msdn.microsoft.com/en-US/wpf/thread/63974f4f-d9ee-45af-8499-42f29cbc22ae for the implementation of GetCell().Thanks & Regards dhampall
- 回答の候補に設定 Sheldon _XiaoModerator 2012年7月30日 7:49
- 回答としてマーク Sheldon _XiaoModerator 2012年8月7日 6:56
-
2012年7月27日 17:42
-
2012年7月30日 7:51モデレータAdditional, you could use DataGridCell.IsSelected property.
Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

