Questions tagged [datagridtemplatecolumn]

Represents a DataGridColumn customizable implementation

Learn more about DataGridTemplateColumn on MSDN.

275 questions
4
votes
1 answer

Binding ComboBox to DataGrid Entry

Solved problem, but still have questions. See end of post, or read on for context. I'm trying to setup a WPF datagrid which has many templated columns with comboboxes inside of them. In particular I'm having trouble with data-binding. Data…
4
votes
1 answer

WPF DataGridTemplateColumn combobox updating all rows

I have this XAML that selects a value from a combobox that the ItemSource is a Enum. The tutorial I used is: http://www.c-sharpcorner.com/uploadfile/dpatra/combobox-in-datagrid-in-wpf/
user3428422
  • 4,300
  • 12
  • 55
  • 119
4
votes
0 answers

Get Binding from DataGridTemplateColumn

I'm trying to build a generic converter to Excel for my DataGrid. I'm using WPF 4.0 and a DataGrid User Control. This converter should take all values from this grid (or selected rows of it) and export to excel (by saving a file). It works, but i'm…
Gustavo Gonçalves
  • 528
  • 1
  • 12
  • 33
4
votes
5 answers

c# datagridview column autosizemode

I wish that by default the columns uses the AutoSizeMode = DisplayedCells; but I wish also the possibility to resize the columns, but DisplayedCells type doesn't allow to resize.. any ideas?
ghiboz
  • 7,863
  • 21
  • 85
  • 131
3
votes
1 answer

DataGridTemplate Visibility Binding Not working

I have this datagridtemplatecolumn of mine which I would like to bind to a property on my project page which has a type of System.Windows.Visibility. The problem is that whenever im compiling the XAML Below is it throws me an error like this in…
Allan Chua
  • 9,305
  • 9
  • 41
  • 61
3
votes
1 answer

Bind DataGridTemplateColumn Visibility

I am trying to bind the visibility of a column in a datagrid to a boolean DependencyProperty in the ViewModel (Set as data context of the View - UserControl in this case). For some reason (I don't seem to understand) it just doesn't work. After…
Tomer
  • 4,382
  • 5
  • 38
  • 48
3
votes
1 answer

How to Sort DataGridTemplateColumn (which uses MultiBinding), in the same order as the Multibound fields

I have a custom entity, which contains FirstName, LastName properties (it has other properties also). I bind this entity to a datagrid, which displays FullName (LastName, FirstName) as a DataGridTemplateColumn (using MultiBinding with StringFormat).…
3
votes
1 answer

Sorting doesn't work on WPF DataGrid templated columns?

I noticed that sorting always do not work on DataGrid templated columns, is there any solution for this problem?
user683957
3
votes
3 answers

DataGrid: dynamic DataTemplate for dynamic DataGridTemplateColumn

I want to show data in a datagrid where the data is a collection of public class Thing { public string Foo { get; set; } public string Bar { get; set; } public List Candidates { get; set; } } public class Candidate { …
3
votes
1 answer

styling the datatemplate to fit silverlight datgrid column header

i have a style with datatemplate in xaml page as shown below . < Style x:Name="mytemplate" x:Key="mytemplate" xmlns:dataprimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Data" …
subash
  • 4,050
  • 14
  • 51
  • 78
3
votes
1 answer
3
votes
1 answer

Styling columns based on DataGridTemplateColumn in a WPF DataGrid

I am using a WPF DataGrid where one of the columns has a requirement to show an "Edit" hyperlink if the row is editable - this is indicated by a boolean flag in the backing model for the row. I was able to achieve this using a DataGridTemplateColumn…
Naresh
  • 23,937
  • 33
  • 132
  • 204
3
votes
2 answers

Datagrid (WPF) Column styling programmatically (not xaml)

I have looked on SO but haven't found an exact answer to what I am looking for. I have a DataGrid view bound to a data source. I want to style columns programmatically after the window with the datagrid is visible. I also want to change it from time…
ssarangi
  • 602
  • 1
  • 10
  • 28
2
votes
2 answers

Click on a datagrid column header impossible

I created a datagrid with dataGridTemplateColumn and I can't use the click on header to sort anymore. Here is a sample of my code :
JohnM
  • 75
  • 5
2
votes
2 answers

WPF decomposition - DataGridTemplateColumn

I am trying to move custom DataGrid column definition into a UserControl. MyComboBoxColumn.xaml
alex2k8
  • 42,496
  • 57
  • 170
  • 221
1 2
3
18 19