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
235
UltraGrid MultiLine automatic height and width
posted

Hi,

I want to display the cell's text automatically using multiline, without the need to adjust the height using the mouse.

Here is a picture of my problem :

I needed to manually(using mouse) adjust the height of the row to let the text display in multiline, and as you can see, the height of every rows got updated.

I was thinking of using the column.MaxWidth value on the column i want to update and using an event after the cell value is updated to validate the text length and then modify the line height, if that is possible?

Am I on the right path? Any hints to give me? I can't seem to find the place to set the height of a specific line.

 

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi, 

    There's nothing to it:


            private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
            {
                UltraGridLayout layout = e.Layout;
                UltraGridOverride ov = layout.Override;

                ov.RowSizing = RowSizing.AutoFree;
            }

    You could also use AutoFixed, if you prefer that the user not be allowed to resize the rows.

    If something changes and you need to refresh the row height, you can call row.PerformAutoSize().

Children