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
300
Grid not respecting column Editor FormatInfo
posted

This is in version 9.2. I'm setting the EditorControl for numeric columns in a grid. I'm also programatically changing the FormatInfo on the EditorControl so that DecimalSeparator=comma and GroupSeparator=period. I'm not changing the regional settings in Windows though.

This works fine in the control outside of the grid, but the grid column always uses the current regional settings for the separators (opposite of what I'm trying to set)

This is what I'm doing in my InitializeLayout event. I think it used to work correctly:

col.EditorControl = ((NumericTextBox)c);
col.PromptChar = ' ';
col.CellAppearance.TextHAlign = HAlign.Right;
col.MaskDisplayMode = Infragistics.Win.UltraWinMaskedEdit.MaskMode.IncludeLiterals;

// I've tried adding combinations of the following properties, but there is no
// change in behavior 

col.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Double;
col.MaskInput= "{double:-16.5}";
col.FormatInfo=((NumericTextBox)c).FormatProvider; // Looking at this in the debugger, it shows what I want, but the grid does not display what I want.

 

 

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    The grid doesn't use the actual Control. The control simply provides a copy of it's own editor for use in the grid. So there are many control-level properties that will not affect the grid.

    If you want to change the FormatInfo on a grid column, you need to set the FormatInfo on the column itself. Setting it on the EditorControl will have no effect.

    If setting FormatInfo on the column is not working, either, then something else is wrong. I think, perhaps, that FormatInfo does not get called unless there is also a Format applied to the column. So try setting the Format on the column, as well, and see if that helps.

Children