This is a migrated thread and some comments may be shown as answers.

Bring a GridViewDataColumn in edit mode programatically

1 Answer 52 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Nainil
Top achievements
Rank 1
Nainil asked on 19 Mar 2014, 04:40 PM
Let's assume I have a button on my window. I want to click the button and shift the focus to one of the cells in the grid and bring it in edit mode. How to got about this?

1 Answer, 1 is accepted

Sort by
0
Nainil
Top achievements
Rank 1
answered on 19 Mar 2014, 06:02 PM
Never mind. I figured it out.
Either one of the below works:
((GridViewCell)oGridViewRow.Cells[2]).IsInEditMode = true;

OR

((GridViewCell)oGridViewRow.Cells[2]).BeginEdit(); 
Tags
GridView
Asked by
Nainil
Top achievements
Rank 1
Answers by
Nainil
Top achievements
Rank 1
Share this question
or