Skip to content

Ultragrid Cell word wrap

New Discussion
Adeyinka Majekodunmi
Adeyinka Majekodunmi asked on Jan 3, 2018 2:34 PM

If there a way to make text in a grid cell auto wrap?

I have done the following:

.Grid.DisplayLayout.Override.CellMultiLine = DefaultableBoolean.True
.Grid.DisplayLayout.Bands(0).Columns("Description").CellMultiLine = DefaultableBoolean.True
.Grid.DisplayLayout.Override.RowSizing = RowSizing.Free
.Grid.DisplayLayout.Bands(0).Override.RowSizing = RowSizing.Free
.Grid.DisplayLayout.Override.RowSizingAutoMaxLines = 20

But my grid will not auto wrap. I can get one grid to wrap by calling performAction but not the rest of my grid.

I thought this was a bug in my previous version but I have upgraded to 17.2 and still the same issue.

Sign In to post a reply

Replies

  • 0
    Divya Jain
    Divya Jain answered on Jan 2, 2018 5:12 PM

    Hello Adeyinka, 

    I followed the code you provided and created a sample of UltraGrid for cell autoWrap behavior.

    In my sample for RowSizing instead of using ‘Free’ option I am using  ‘AutoFree’ option and when I run the sample I found my sample is working as expected. In the grid cell does have text wrapped in multiple line. 

    I have attached the sample project I used to test this.  Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem. 

    If the project does not work correctly, then the change in behavior is due to differences in your environment from mine and these differences can be anything from operating system version to the specific version of the Infragistics DLL versions used.  My test was performed using version 17.2.20172.2005. 

    Please provide more details about your machine and version of the assemblies that you are referencing so that I can modify the environment that I am testing in to match yours.

    If the project does show the product feature working correctly, then more information will be needed to reproduce the issue in a sample that can be used for debugging.  It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.  This can be done by either making the sample that I provided more like your application or by isolating the behavior from your application by removing dependencies on any third parties or databases. WinGrid172.zip

    Please let me know if I can provide any further assistance.

    • 0
      Adeyinka Majekodunmi
      Adeyinka Majekodunmi answered on Jan 3, 2018 7:56 AM

      Thank for the reply. I did use Autofree. What I don't understand is why it works on some of my grid and not the others. I also have to call the 'PerformAutoSize'

      I am looking at my grid control as it is a custom control derived from the ultragrid control.

    • 0
      Adeyinka Majekodunmi
      Adeyinka Majekodunmi answered on Jan 3, 2018 8:23 AM

      I have tried your sample project and it is having issues. As soon as you resize a coulumn, It reverts to single line.

      In order to keep multiline, I have to select each cell in turn and performautosize. This is not efficient.

      • 0
        Mike Saltzman
        Mike Saltzman answered on Jan 3, 2018 2:34 PM

        What version of the controls are you using? I tried Divya's sample project using v17.2 and it works fine for me. When I resize the multi-line column the height of the rows automatically adjusts and shows the mutliline text correctly. If I resize another column, it has no effect on the row height. 

        So my guess is that you might be using an older version of the controls and maybe there was a bug in that version. 

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Adeyinka Majekodunmi
Favorites
0
Replies
4
Created On
Jan 03, 2018
Last Post
8 years, 8 months ago

Suggested Discussions

Tags

No tags

Created on

Jan 3, 2018 2:34 PM

Last activity on

Jan 3, 2018 2:34 PM