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...
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...
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 ...
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...
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...
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...
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...
How can I can an event to fire similar to selectedindexchanged with the datagridcombobox column type?
...
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...
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...
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...
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?
...
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...
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...
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...
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...
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=...
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...
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...
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...