Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
115
Individual Backcolor per Cell if readonly
posted

I would like to set the back color of a cell to gray for all not editable cells ( cell.Filed.Settins.AllowEdit = false).

Setting one cell of a column to gray using the CellValuePresenterStyle will set the whole column to gray.

-> is this a bug, or is it not possible to set the column style individually per cell?

Stefan

 

Parents
No Data
Reply
  • 9836
    posted

    Stefan,

    This is because the AllowEdit is a property of the Field object and can't be set for an individual cell. When you set this to false it disable editing for all of the cells in the column or in the grid. 

    One option is to create a style for the CellValuePresenter and bind the IsEnabled property to the cell's value using converter. You can do the same thing for the Background property.

    For more details check out the following forum thread:

    http://blogs.infragistics.com/forums/p/24960/91483.aspx

    Let me know if you have any questions with this matter.

Children