TrueDBGrid - displaying string data when bound to a Datatable

Posted by: wayne.trueman on 25 January 2018, 9:18 am EST

    • Post Options:
    • Link

    Posted 25 January 2018, 9:18 am EST

    I have noticed on 2016+ builds of C1, that the TrueDBGrid no longer trims string fields when bound to a Datatable, which makes string fields which are center aligned, both not center aligned, and included the ellipses as if there is more of the string to be displayed. I know I can work around this using OwnerDraw if necessary, but I was hoping there was a simpler solution, maybe a property of the grid that can be set so that the behaviour dealing with string fields is to trim the contents before they are drawn in the cells.

  • Posted 29 January 2018, 7:10 am EST

    Hi Wayne!

    In TrueDBGrid, you can use Timming property to control the behaviour related to trimming cell content.

    You can set this property to the required StringTrimming enum value, like this :

    c1TrueDBGrid1.Styles[0].Trimming = StringTrimming.Character;
    

    Please see this help link :

    http://help.grapecity.com/componentone/NetHelp/c1truedbgrid/webframe.html#C1.Win.C1TrueDBGrid.4~C1.Win.C1TrueDBGrid.Style~Trimming.html

    Best regards,

    Meenakshi

Need extra support?

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

Learn More

Forum Channels