Questions tagged [datagridcomboboxcolumn]

The DataGridComboBoxColumn is a DataGridColumn implementation for ComboBox'able cells

Learn more about DataGridComboBoxColumn on MSDN.

330 questions
91
votes
8 answers

Binding ItemsSource of a ComboBoxColumn in WPF DataGrid

I have two simple Model classes and a ViewModel... public class GridItem { public string Name { get; set; } public int CompanyID { get; set; } } public class CompanyItem { public int ID { get; set; } public string Name { get; set;…
Slauma
  • 175,098
  • 59
  • 401
  • 420
29
votes
2 answers

Binding a WPF DataGridComboBoxColumn with MVVM

I've looked at the answers to various questions, but haven't managed to map the content in the answers to the problem I'm attempting to solve. I've reduced it down to the following code (representative of the outcome I'm trying to achieve), and…
Rob
  • 45,296
  • 24
  • 122
  • 150
27
votes
4 answers

How to implement editable DataGridComboBoxColumn in WPF DataGrid

I want to enable the user to edit some data in WPF DataGrid ( from the .net Framework 4.0). The "instruments" column should allow the user to select an available intrument from a static list or to write a free text. My DataGrid is binded to data…
Alexander Zwitbaum
  • 4,776
  • 4
  • 48
  • 55
15
votes
3 answers

How to Bind data to DataGridComboBoxColumn in DataGrid using MVVM

This is driving me crazy. I have a DataGrid which has a DataGridComboBoxColumn which I want the user to be able to use to select from. This is the basic outline of my grid.
GoalMaker
  • 905
  • 3
  • 9
  • 22
14
votes
2 answers

WPF - example with DataGridComboBoxColumn

I have a datagrid with 2 columns. One column contains role information, the other column should have a combo box with a list of available users. The data in the combobox is unrelated to the data in the first column. I'm thrown off by the fact that…
Unknown Coder
  • 6,625
  • 20
  • 79
  • 129
13
votes
2 answers

Problem binding DataGridComboBoxColumn.ItemsSource

I have 3 tables: Item - which is the DataContext - it has a navigation column Group Group - has a navigation column Category. I want to have in the DataGrid both (Category & Group) columns and when I choose a category it should display in the group…
Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632
12
votes
2 answers

wpf datagrid combobox column

I have trouble reading the field. I have tried in different ways but still can not. I want to read the value that the user selected the following 3 values. Code in XAML Code in C…
user231605
  • 159
  • 1
  • 3
  • 10
11
votes
6 answers

WPF DataGrid: DataGridComboxBox ItemsSource Binding to a Collection of Collections

Situation: I've created a DataGrid in XAML and the ItemsSource is binded to an ObservableCollection of a certain class that contains properties. Then in C#, I create a DataGridTextColumn and a DataGridComboBoxColumn and binded these to the…
Partial
  • 9,529
  • 12
  • 42
  • 57
10
votes
1 answer

Binding the ItemsSource for a WPF DataGridComboBox Column

Question: Most code samples on the DataGridComboBox seem to use a static resource as the ItemsSource. In my use case, I'd like to provide different ItemsSources with each bound object. Can this be done? Background: I'm trying to bind a collection…
Rox Wen
  • 253
  • 1
  • 4
  • 12
7
votes
3 answers

DataGridComboBoxColumn different ItemsSource for different rows

Here the question similar to my question is asked, but I did not find the solution there. My Question : How to bind different data(say Lists) to the "DataGridComboBoxColumn" for each ComboBox in a different rows. Here is the code I…
Gopi
  • 236
  • 2
  • 6
  • 20
7
votes
1 answer

DataGridComboBoxColumn loses its content when selection changes

When I click a cell in my DataGridComboBoxColumn the ComboBox gets visible and I can select items. When I have selected an item its visible at the top thats fine. But when the cell aka ComboBox loses its focus because I click something different in…
msfanboy
  • 5,273
  • 13
  • 69
  • 120
6
votes
2 answers

Get DatagridviewComboBoxCell's SelectedIndex

I have a Winforms application which has a DataGridView. The DataGridView is not bound to a datasource. I'm reading a text file and according to each line in the file, I'm placing the values of each row to the datagrid. I have a column in my grid…
subirshan
  • 323
  • 2
  • 7
  • 20
6
votes
3 answers

ElementStyle error for DataGridComboBoxColumn in WPF

I'm trying to alter the ElementStyle of a DataGrid ComboBox column. Supposedly the Style is really of type TextBlock when the control is not being edited. So as shown in other examples, I've tried:
Tekito
  • 840
  • 8
  • 24
5
votes
1 answer

WPF: Databinding with DataGridComboBoxColumn

This is what I want: There is a combo-box column bound to the ApplicationKey property of ClassA The combo-box is populated with ApplicationTokens from a static function all. An ApplicationToken has a ApplicationName and ApplicationKey property When…
Jonathan Allen
  • 68,373
  • 70
  • 259
  • 447
4
votes
3 answers

Is it possible to exposed the DataGridComboBoxColumn immediately?

Is it possible to have a WPF Toolkit Data Grid's DataGridComboBoxColumn "exposed" when the Data Grid loads? By default you have to click in the cell to expose the combo box. I'd like the user to see that the combo box is available without having to…
GAR8
  • 293
  • 1
  • 5
  • 14
1
2 3
21 22