Hi,
in a dataGrid, can I apply a style to text into cell from code behind?
I know that I can use DataTrigger, but I can't add a new property to model that it is binds with datagrid.
With
DataGridRow tmpRowSelected = dgProperties.ItemContainerGenerator.ContainerFromItem(dgProperties.SelectedItem) as DataGridRow;
I get my selecte row, I would apply TextDecorations.Strikethrough to text into the cells of this row.
Thanks.

Roberto SalemiPosted Apr 20, 2015, 4:20 AM
http://www.c-sharpcorner.com/Forums/Thread/293818/wpf-datagrid-read-only-but-not-for-new-row.aspx
I resolved with to add a new property "IsNewItem" in my model, so I check:
and I applied this element style to Columns.
Akhil GargPosted Apr 17, 2015, 12:32 PM
Roberto SalemiPosted Apr 17, 2015, 9:48 AM
private void dgSample_BeginningEdit(object sender, DataGridBeginningEditEventArgs e)
Thanks to a web user.