C1TrueDBGrid Wrap vs Concatonate

Posted by: ivan.stanojkovski on 18 December 2021, 5:35 pm EST

    • Post Options:
    • Link

    Posted 18 December 2021, 5:35 pm EST - Updated 3 October 2022, 10:48 pm EST

    Hello

    We want to achieve something like this.

    For example in some cell in the grid we have “Environment.NewLine/vbNewline/vbCrLf”, but we don’t want to display contect of the cell in multiply lines in the same cell, but to merge/concatonate it into single line in the cell.

    Example in attchment.

    Best regards.

  • Posted 20 December 2021, 2:03 am EST

    Hi,

    You can use the OwnerDrawCell event of the C1TrueDBGrid to achieve this. First, you need to set the OwnerDraw property to true for the DisplayColumn that you want to owner draw. Then using the OwnerDrawCell event you can manually draw the cell and remove new line characters from the text before rendering it to the cell.

    Please refer to the sample attached.

    Regards

    Avnish

    TDB_NoNewLine.zip

Need extra support?

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

Learn More

Forum Channels