Row Height.... Auto Sizing Not Working

Posted by: daniel.banks on 5 August 2019, 4:58 am EST

    • Post Options:
    • Link

    Posted 5 August 2019, 4:58 am EST

    Hi, I am having problems I have both text that wordwraps and text with carriage returns in a row on a form, and have used to code below (as found on these forums). But everything still appears as a single row.

    grdNotes.AllowRowSizing = C1.Win.C1TrueDBGrid.RowSizingEnum.IndividualRows

                For Each col As C1.Win.C1TrueDBGrid.C1DisplayColumn In grdNotes.Splits(0).DisplayColumns
                    If col.DataColumn.Caption <> "" Then
                        col.AutoSize()
                        col.Style.Wrap = C1.Win.C1TrueDBGrid.TextWrapping.Wrap
                    End If
                Next
    
                For r As Integer = 0 To grdNotes.Splits(0).Rows.Count - 1
                    grdNotes.Splits(0).Rows(r).AutoSize()
                Next
    
  • Posted 6 August 2019, 6:52 am EST

    Hello,

    I could not replicate the issue and it is working fine at my end.

    Please go through the attached sample which is working fine at my end.

    Please modify the sample accordingly or provide a stripped down sample replicating the issue, so that I can narrow down the problem.

    Note : Using Autosize property of C1DisplayColumn class and Wrap property of Style object of C1DisplayColumn class together does not make any sense. Instead of wrapping the data to the new line, it will increase the width of the column accordingly to fit the data.

    I hope it clears.

    Thanks and Regards,

    Prabhat Sharma.

    RowHeightTDBDemo.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels