I have a column that is a numeric. I have the cell type set to XamMaskedEditor. When the cell is a specific value that is predefined i.e. “255” I wish to not display 255 but put in some alternative text such as “Read-only”. I would also like this cell to be read-only.FYI: I also know that this datarecord will be the first row in the grid. All other cells in this column in the other rows would be editable.
Hello,
There are couple of options here :
1. Disabling the cell when a value: You can create a style for the XamMaskededitor or the CellValuePresenter and create a trigger that targets the Value/content property of the CVP and set the IsEnabled property to false when it equals 255
2. Displaying different value : You can either use a converter (IValueConverter) which you can appply at this field's Converter property or the ValueToDisplayTextConverter property of the XamMaskedEditor.
Option 1 works great.
But step 2, I attempted to use the fields converter property using the example in the online help and I believe there is an error in this example. In the example is supposed to display Yes/No instead of a checkbox, but it displays a checkbox.