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
0
votes
3 answers

wpf datagrid: write value in textbox column

I have a Datagrid with some columns. It is binded to a list of objects. One of the column is a text column: I need it as a "validation" column, infact I want that, for each row, the value of this cell is "OK" or "NOT OK", based on values present in…
FrancescoDS
  • 1,077
  • 4
  • 21
  • 55
0
votes
0 answers

WPF Datagrid SelectedItem loses binding after edit

EDITED: As comments have suggested, I should implement the MVVM pattern, I have done exactly that. However the same problem still persists. So I have altered the question accordingly: I have a datagrid containing two columns bound to an observable…
0
votes
1 answer

DataGridTextColumn is highlighted only on textblock when selected after defining an alignemnt

I have a datagrid which I define the styles and columns in code behind as following : My_Data_Grid.ItemsSource = an_observableCollection ; Style my_Style = new System.Windows.Style(typeof(DataGridCell)); DataGridTextColumn a_Column = new…
Dr. Strangelove
  • 2,725
  • 3
  • 34
  • 61
0
votes
1 answer

How to set values of DataGrid cell in C#

I'm writing application in .NET 4.5 framework. I use DataGrid to show data. I want to add new text collumn and to each row I want to assign text value to cell in this collumn. I don't know How to do this. I don't know how to bind data, or can I…
Saajuu
  • 107
  • 1
  • 10
0
votes
1 answer

GWT TextColumn in CellTable with multiple lines

I'd like to display informations about a book in a CellTable in GWT. For example its content. How can i create a TextColumn that displays that much text. Multiple lines or a scrollbar is what i'm looking for. Thanks in advance
user1167575
0
votes
1 answer

How can i use DatagridTextColumn.ElementStyle to Make DatagridTextColumn readonly?

can i use elementStyle to bind DatagridTextColumn IsReadOnly to a Property inside a ViewModel(here IsReadOnlyProperty)? something like this: