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
60
Text editor in grid does not stretch when AutoArrangeCells = Never
posted

Ok, I am trying to figure out what is different.  I have 2 data grids, each bound to BindingLists.  The only real difference between the two is that one uses the default value for  FieldLayoutSettings.AutoArrangeCells and the other has it set to Never because it does some items on different rows. It does not matter if the text field spans columsn, rows, or has no spanning whatsoever.

Here is the code that I use to set the editior so tha it wraps text.  The both use the identical code:

            Field.Settings.EditorType = typeof(Infragistics.Windows.Editors.XamTextEditor);
            Setter setter = new Setter(XamTextEditor.TextWrappingProperty, TextWrapping.Wrap);
            Style style = new Style(typeof(XamTextEditor));
            style.Setters.Add(setter);
            setter = new Setter(XamTextEditor.VerticalAlignmentProperty, VerticalAlignment.Stretch);
            style.Setters.Add(setter);
            setter = new Setter(XamTextEditor.VerticalContentAlignmentProperty, VerticalAlignment.Stretch);
            style.Setters.Add(setter);
            Field.Settings.EditorStyle = style;

  Any ideas?

Parents
No Data
Reply
  • 138253
    Offline posted

    Hello JeremyAMR,

    Thank you for your post. I have been looking through it and I used the code you provide, but I wasn’t able to reproduce your behavior. I attached a sample project using your style, where there is no difference between the two XamDataGrids(the one with AutoArrangeCells set to True and the other with AutoArrangeCells set to False). Please note, that we are making effort to ensure that all forum posts are answered by an Infragistics employee. We believe that other community users may benefit from it as well.

    If you have any further questions feel free to ask.

Children
No Data