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
365
Custom format string per cell
posted

Dear Infragistics support,

I'm trying to fulfil the following requirements for a grid with all bound columns:

  • Edit a cell value in a dedicated column with the fixed input mask {double:-8.6}
  • Display the cell value in the dedicated column with a custom format string (percentage, integer value, numeric with variable precision)
  • The format string is variable per cell, i.e. not equal for all cells of the deciated column

The expected behaviour is, that the raw value is displyed in edit mode as defined in input mask. Whenever the edit mode terminates, the formatting applies to the dedicated cell.

The data type of the affected bound column in my example is Nullable<decimal>. My attempts to realize the requirements have failed so far using the following approaches:

  1. Assign the UltraGridCell.Editor an EditorWithMask instance with set MaskInput and FormatString property values in InitializeRow event of the grid.
    The expected formatting didn't apply after exiting the edit mode.

  2. Assign the UltraGridCell.EditorComponent an UltraNumericEditor instance with set MaskInput and FormatString property values in InitializeRow event of the grid.
    Only the input mask seems to apply, but not the format string.

I'm aware to set UseEditorMaskSettings = true for the dedicated column.

What do I miss or is there a different, more promising approach? By reading other posts, I stumbled over the usage of a custom data filter to handle the custom formatting.

I kindly expect your response.