Home › Forums › WPF controls › Xceed DataGrid for WPF › Grid Bound to DataTable. How can I set rows to be Read Only?
I have bound my grid to a DataTable.
The dataTable belongs to a DataSet.
My DataTable contains a number of DataRows.
Does anybody have any suggestions as to how I might be able to set various rows in the DataGrid to be read only?
Many thanks for your help,
Imported from legacy forums. Posted by Simon (had 2523 views)
You can create a style for the DataRow class, and in this style place triggers that would change the “ReadOnly” property to true whenever needed…
The style can be applied either implicitelly ( in a resource dictionary, without a x:Key ) or by referencing the style in the “ItemContainerStyle” property for the DataGridControl.
Imported from legacy forums. Posted by Marcus [Xceed] (had 209 views)
Thank you very much for your help,
Imported from legacy forums. Posted by Simon (had 3554 views)