Reputation: 12874
I am working on a WPF MVVM Project.
Now i have a DataGrid in which i want this.
When ever the user comes to the FirstColumn of the DataGrid the Cell should be transformed into ComboBox and when user goes out of that cell the ComboBox should disappear and ComboBox selected value to the CellText.
How can i do that.
Only the selected Cell in the first column should have ComboBox
Upvotes: 0
Views: 1724
Reputation: 70142
You will find this much easier if you use a DataGrid
rather than a GridView
. The DataGrid
has the concept of CellTemplates and CellEditingTemplates built in, which make it very easy to render an edit control whilst the user is editing the cell.
Oh yes, and it has a combo-box column type, DataGridComboBoxColumn.
Upvotes: 3