I have a WPF Toolkit DataGrid with one DataGridTemplateColumn. I've specified in a grid attribute that I wish all columns to be sortable, but the DataGridTemplateColumn won't allow it. All other columns do allow sorting. I've even tried explicitly…
I am using Microsoft WPF datagrid. I have noticed a strange behavior with WPF datagrid DataGridTemplateColumn. When you use the templateColumn in the grid and the template column contains some controls when you tab from the previous column the focus…
I am trying to get the name of the property associated with a particular DataGridColumn, so that I can then do some stuff based on that. This function is called when the user clicks context menu item on the column's header...
This is fine for the…
I've got a DataGrid I've bound to a SqlDataApter. If I set up the XAML for the grid using DataTextColumn as illustrated in the code below it works perfectly
In WPF datagrids, I have a column defined as DataGridTemplateColumn which I'll need to be using on all kinds of columns. As a very simplified example please consider the below as a dummy sample:
Seems I've hit a wall trying to use DataTemplates on my DataGrid. What I'm trying to do is to use one template to show two rows of text for each cell. But it doesn't seem to be possible to Bind the column in any way.
Following code hopefully shows…
I'm going bonkers with the following WPF DataGrid+ComboBox scenario.
I have a set of classes which look like;
class Owner
{
int ID { get; }
string Name { get; }
public override ToString()
{
return this.Name;
}
}
class…
I have several instances where I would like to have several controls in a single column in a datagrid.
For example, I have a dataset that contains images with matching description, image source, timestamp, geotag, etc. I would like to display this…
I have a DataGrid in WPF. And I am trying to add Buttons to certain cells of the grid, after it is bound to a particular ItemsSource. I have tried to do this in the xaml like this:
I tried several ways to factor out the format of a cell in a WPF DataGrid (the one provided with .NET 4):
a data converter,
the "StringFormat" binding property within a style,
the "StringFormat" binding property within a data template.
I will…
I have "Preferences" data structure where I have string "Value" field and enum for "Type" field.
Type can be 0-Boolean, 1-Integer, 2-String ...
Depending on value in this Type field I'd like to display "Value" cell different way Checkbox, Textbox,…
In WPF's DataGrid control, if you set a column to one of the default column types (like DataGridTextColumn or DataGridCheckBoxColumn), sort on that column, and then change its value, the grid will automatically be re-sorted.
However, if you use a…
I need to access the text in a DataGrid's template column from code behind, but I don't know how. I need to change the text to whatever string I pass to it on the SelectionChanged event. Can someone please tell me how to achieve this? I found a…