datagridcomboboxcolumn

DataGridComboBoxColumn is empty if text does not exit in the dropdown

I am using the WPF Toolkit DataGrid bound to Person collection. The LastName is represented by the ComboBox with wellknown names. <x:Array x:Key="knownLastNames" Type="sys:String"> <sys:String>Johnson</sys:String> <sys:String>Williams</sys:String> </x:Array> The problem is that if I set LastName to "Brown" (missed in knownLast...

What namespace must be used to get a DataGridComboBoxColumn?

I am writing an app in C# 3.5 in WPF. I want to programmatically add a DataGridComboBoxColumn in C# to a WPF toolkit DataGrid. The problem is that the control itself seems to not exist because I am missing either a directive or an assembly. I thought that System.Windows.Controls and by adding a reference to the WPFToolkit would handle th...

WPF - Help with DataGrid's ComboBox column in UserControl

I have a MainWindow.xaml (which consists of a TabControl) and a few UserControls (which are loaded into the TabItems). One particular UserControl has a WPFToolkit DataGrid with custom columns (not auto-generated). One of these columns is a ComboBox-type column that binds to a property in my model called "Status". I also have an Enum for ...

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 properties of the objects inside the ObservableCollection. I can bind the DataGridComboBoxColumn...

WPF ObjectDataProvider that supports linq filtering?

Is there an WPF ObjectDataProvider that supports "Where" I mean like in asp.net there is an option to have a dataprovider that supports defining the results? What I actually need is two ComboBoxes that when I choose a value in the first it limits the second one. Say I have a parent table Category and a child table Group. I want that whe...

WPF - example with DataGridComboBoxColumn

Sometimes the easiest examples are the hardest to find . . . 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 the combobox does not have a...

Problem binding DataGridComboBoxColumn.ItemsSource

Hello! 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 col only the Category.Groups. Here is the code I am working on: <tk:DataGrid Au...

WPF what is the equivalent of SelectedIndexChanged for a datgrid combo box column?

How can I can an event to fire similar to selectedindexchanged with the datagridcombobox column type? ...

How Do I Bind an int to a DataGridComboBoxColumn?

Having successfully used DataGridTextColumn a few times, I was unprepared for the difficulty I encountered using DataGridComboBoxColumn. I can bind an int field in a class to DataGridTextColumn, but I have failed completely to bind the same field to DataGridComboBoxColumn. When the screen is displayed, the DataGridTextColum contains a v...

Binding to DataGridComboBoxColumn from collection

Trying to bind to a collection in WPF, I got the following to work: XAML: <toolkit:DataGrid Name="dgPeoples"/> CS: namespace DataGrid { /// <summary> /// Interaction logic for Window1.xaml /// </summary> public partial class Window1 { private readonly ObservableCollection<Person> personList = new Observab...

DataGridComboBoxColumn help needed (WPF DataGrid)

I've tried reading a lot of tutorials, but none have helped. Here is what I want to do. First.... start simple I want to turn a regular DataGridTextColumn into a DataGridComboBoxColumn. E.g just display the cell text on the dropdown, and doesn't matter if the dropdownlist is empty. I havn't even managed to do this e.g From `<dg:DataG...

How to force editing of a DataGridComboBoxColumn?

Hi, I can expose a DataGridComboBoxColumn on a grid, but the user must click it twice to show its drop-down list (the first is to gain focus and enter in edit-mode). How can I force programatically to show the drop-down list? ...

WPF DataGridComboBoxColumn`s ComboBox is only visible when DataGrid has IsReadOnly=FALSE

Hello, Why is the ComboBox in that column only visible via double-click in the empty cell when the DataGrid is set to IsReadOnly = FALSE ??? <DataGridComboBoxColumn Width="*" IsReadOnly="False" Header="test" /> using a DataTemplateColumn works as always... whats wrong with that DataGridComboBoxColumn? works: <DataGridTemplateColum...

WPF: Binding DataGrid to a list<Product> having a DataGridComboBoxColumn bound to a list<Category> ?

Hello, I have a DataGrid with ItemsSource set to a list of products and I have a DataGridComboBoxColumn inside the DataGrid with ItemsSource set to a list of categories. That way I want the user to choose a certain category for each product. I always get the binding error: BindingExpression path error: 'Categories' property not found...

How to update a database after a DataGridComboBoxColumn has changed?

hi, I have a wpf datagrid that is bound to one dataset and has two combobox columns that take their values form the main dataset and has options from two different databases, in every other cell (which are regular textbox cells) once editing is finished the database is updated through an dataset.DataTable.RowChanged event, the problem is...

WPF: DataGridComboBoxColumn loses its content when selection changes

Hello, 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 the DataGrid then there is no item/text visible anymore in the cell I have previou...

WPF4 DataGridComboBoxColumn doesn't work

Look how odd is the following scenario: <DataGrid.Columns> <!--Doesn't work--> <DataGridComboBoxColumn Header="Vendor" ItemsSource="{Binding Vendors}" SelectedItemBinding="{Binding Vendor, UpdateSourceTrigger=PropertyChanged}" DisplayMemberPath="Contact.Title"/> <!--Works--> <DataGridTemplateColumn Header=...

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 of Question class objects to a WPF DataGrid, using a DataGridComboBoxColumn control. The...

access the Window's DataContext from within a DataGrid

I have some problem to access the Window's DataContext from within a DataGrid. The DataGrid is bound to a IBindingList: public IBindingList Items{ get; set; } private void initItems() { //ItemFactory is a Linq2SQL Context, Items is the view of availabe Items this.Items = this.ItemFactory.Items.GetNewBindingList...

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. <DataGrid ItemsSource="{Binding GoalList}" DockPanel.Dock="Bottom" AutoGenerateColumns="False"> <DataGrid.Columns> <DataGridComboBoxColumn ItemsSource="{Binding Life...