Questions tagged [datagridtextcolumn]

Represents a DataGrid column that hosts textual content in its cells.

Represents a DataGrid column that hosts textual content in its cells. This column hosts TextBlock elements for cells that are not in editing mode and a TextBox control for a cell that is in editing mode.

By default, the DataGrid control generates columns automatically when you set the ItemsSource property. The generated columns are of type DataGridCheckBoxColumn for bound Boolean (and nullable Boolean) properties, and of type DataGridTextColumn for all other properties. If a property does not have a String or numeric value type, the generated text box columns are read-only and display the data object's ToString value.

112 questions
1
vote
1 answer

How do I detect when a cell's value has changed in Silverlight?

I'm working in Silverlight, trying to figure out how to set a grid cell font color based on the contents of the cell. I have an ObservableCollection bound to a DataGrid, and my items implement INotifyPropertyChanged so the grid updates as I change…
Jerod Venema
  • 44,124
  • 5
  • 66
  • 109
1
vote
0 answers

WPF DataGridColumnWidth doesn't work well when PrintVisual

I have a ucReceipt.xml that looks fine in design mode or even it looks good while Opening the window http://prntscr.com/5xl11h:
alkk
  • 331
  • 5
  • 11
1
vote
1 answer

DateGridTextColumn disable null values

I have a DataGridTextColumn binded with a CompositeCollection of 4 ObservableCollection One of the DataGridTextColumn, binded like this:
Kraenys
  • 297
  • 1
  • 5
  • 19
1
vote
0 answers

Reusable style for DataGridTextColumn in WPF

I have set up a DataGrid in a WPF application and have created reusable styles saved in a resource dictionary. However I am unsure how to set up reusable style for elements that make up a datagrid. For example right now I have the following style…
ocajian
  • 667
  • 5
  • 13
  • 29
1
vote
1 answer

format DataGridTextColumn from code-behind

Maybe, I think, things are too simple. I have a datagrid, dynamically adding columns from code behind. This works. Then I have columns with integer-values, which I would like to see right-aligned in the column, but it fails. My Code is: public…
user3367867
  • 565
  • 1
  • 7
  • 19
1
vote
2 answers

How to allow nulls in a DataGridTextColumn with StringFormat

In a DataGrid I have a column: and I want to be able to allow the fields to be changed from populated to blank. (FirstDay is of type DateTime.) …
Conrad
  • 2,197
  • 28
  • 53
1
vote
0 answers

Cannot access property bound to DataGridTextColumn in another element such as Foreground

I have a simple DataGrid with its ItemSource bound to an ObservableCollection where Issue is just a class object containing various properties. I have a handful of DataGridTextColumn items bound to the properties of the Issue object and all…
Chris
  • 41
  • 6
1
vote
1 answer

Binding a column header with a Itemsource

I am Having a Itemsource and from which i bind the values in the datagrid
Raghu
  • 313
  • 2
  • 7
  • 19
1
vote
1 answer

C# - WPF Using DataTrigger in DataGridColumnHeader

How can I use DataTriggers in a DataGridColumHeader? With this code below it doesn't work. Someone got any idea how i can fix this?