Home Forums WPF controls Xceed DataGrid for WPF Grid Bound to DataTable. How can I set rows to be Read Only?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • Xceed Support
    Member
    Post count: 5658
    #22231 |

    Hi,

    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,

    Simon

    Imported from legacy forums. Posted by Simon (had 2523 views)

    Xceed Support
    Member
    Post count: 5658

    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)

    Xceed Support
    Member
    Post count: 5658

    Hi Marcus,

    That’s perfect.

    Thank you very much for your help,

    Simon

    Imported from legacy forums. Posted by Simon (had 3554 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.