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
635
Text Wrapping problem
posted

I'm having a strange problem. I have a XamDataGrid (2011.2) that has a field with TextWrapping enabled. In some cases, the text seems to wrap prematurely independent of the width of the cell.

For instance - "Kit" shows up as "Ki" when not in edit mode, and "Kit" in edit mode. However, if I enter "Kite" or "kit" or "Kit XXX" or " the entire text shows up. If I shrink the column so that it only displays one or two characters per line, the entire word shows up, just on different lines.This seems to happen to

When I turn off text-wrapping, this problem goes away.

I've attached a sample project that demonstrates this - all of the words listed in the project are causing problems in my real project, but strangely, the only one causing a problem in the sample is "Bit".

How do I fix this (without turning off text wrapping)?

InfragisticsTest.zip
Parents
No Data
Reply
  • 138253
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking into it and the sample project you have attached and I suggest you add the following Setter to your XamTextEditor Style in the XamDataGrid’s FieldLayoutInitialized event:

     

    cellEditorStyle.Setters.Add(new Setter(XamTextEditor.PaddingProperty, new Thickness(0)));

     

    Please let me know if this helps you or you need further assistance on this matter.

     

    Looking forward for your reply.

Children