C1TrueDBGrid column heading no longer resizes to fit wrapped text

Posted by: marc.brown on 28 November 2018, 10:08 am EST

    • Post Options:
    • Link

    Posted 28 November 2018, 10:08 am EST

    We have been using one of the 2017* versions of the C1TrueDBGrid control. We set the Wrap property of our display columns’ HeadingStyle to TextWrapping.Wrap. When doing so, the height of the column headers automatically resized to display all of the wrapped text. Upon upgrading to the latest version of the control (4.0.20183.338), this behavior has changed and the column headers are only one row of text tall, even though the text is wrapped.

    Is there a way to get the previous (and I believe correct) behavior back with the new version of the control, short of manually specifying a larger value for the split’s ColumnCaptionHeight?

  • Posted 29 November 2018, 5:44 am EST

    Hi Marc!

    Thanks for reporting this issue.

    As per the specifications, I created a small application that I’m attaching to this post. Can you please modify it so as to reproduce the said behaviour with 2017 version of C1TrueDBGrid control (where you were able to see automatic wrapping).

    Prj_ColHeaderWrap.zip

    As, I’m able to see the same behaviour in 2018v3 and 2017v3 versions (where you need to set ColumnCaptionHeight property). I request you to share back the modified sample so that I can take the appropriate action further.

    Regards,

    Meenakshi

  • Posted 29 November 2018, 11:45 am EST

    I didn’t need to modify the project. It doesn’t expand the height to show all text as you can see from the attached screenshot. I can’t go back and run with the previous version of the control because I don’t have it any more, having upgraded to the latest and greatest. I’ve also attached a screenshot of the properties for the C1TrueDBGrid DLL used in the sample project.

  • Posted 29 November 2018, 11:47 am EST - Updated 4 October 2022, 1:19 am EST

    Sorry, the forum didn’t post my images. Here they are, hopefully.



  • Posted 3 December 2018, 11:39 pm EST

    Hi Marc!

    In order to investigate it further, I request you to share the exact 2017 build version (that you were earlier using) with which you were able to see the automatic height change of header row.

    Also, please let me know if you were using any additional code in the application at your end.

    Regards,

    Meenakshi

  • Posted 5 December 2018, 10:09 am EST

    The 2017 build version was 4.0.20173.282. As to the question of any additional code, I’m not sure I understand what you’re looking for. I didn’t do anything special to get the height change – just switched the Wrap property of each display column from TextWrapping.NoWrap to TextWrapping.Wrap.

  • Posted 6 December 2018, 4:43 am EST - Updated 4 October 2022, 1:19 am EST

    Marc!

    I ran the previously shared sample with 4.0.20173.282 build version, and the behaviour is same as that of 2018v3 builds. The ColumnCaptionHeight property needs to be set in order to show the wrapped text in caption.

    Please refer the attached video demonstrating the said behaviour with 4.0.20173.282 builds (when ColumnCaptionHeight is not set).

    Kindly note, no such issue has been reported earlier. And in order to report it to the concerned team, I need to replicate the issue in 2017v3 builds once. Meanwhile, please set ColumnCaptionHeight property to show the wrapped text in caption.

    • Meenakshi
  • Posted 13 December 2018, 5:02 pm EST

    I understand and I can’t explain how yours works differently than mine did. I can only report that it behaved the way I expected (with word wrapping causing the caption to expand) with the older version. Since you can’t report it as an issue, can you pass along a request to change the behavior for a future version? Automatically word wrapping is completely useless if you have to manually change the caption height to account for it. After all, if columns are user-resizable it’s completely reasonable to expect that a user would resize the column in such a fashion as to change the number of lines of wrapped text. But if the caption height isn’t changed, some of the text will now be out of sight (if the user narrowed one or more columns) or the caption row will have a bunch of blank space at the bottom (if the user widened one or more columns), which is unsightly and unprofessional looking.

    I’m sorry to say that the more I work with the True DB Grid, the more I regret starting with it – things like this crop up, it’s difficult overall to work with, it doesn’t seem to work properly with ComponentOne’s theming engine (as opposed to the visual styles) and it doesn’t always “play nice” with Visual Studio (across multiple versions). It’s a real shame because I’m pretty happy with the rest of the WinForms and WPF controls that I use for my organization.

  • Posted 14 December 2018, 6:06 am EST

    Hi Marc!

    Though, I couldn’t see any difference in wrapped caption behaviour with 2017v3 and 2018v3. I understand your concern here, and therefore I am forwarding this as enhancement request to the development team. You’ll be informed once there is any update from the team.

    > “it doesn’t seem to work properly with ComponentOne’s theming engine (as opposed to the visual styles)”

    Meanwhile, I would like to know some more information on this issue so that I can try to get it addressed. Are you facing problem while using C1TureDBGrid with C1Theme? Please clarify.

    Best regards,

    Meenakshi

  • Posted 10 April 2019, 1:00 am EST

    Hi,

    The issue is fixed with the latest release version. You can either update using C1Live or manually download the assemblies from here:

    http://prerelease.componentone.com/dotnet40/c1winforms/2019-t1/C1WinForms.4_4.0.20191.359.zip

    Thanks,

    Pragati

Need extra support?

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

Learn More

Forum Channels