Text value truncated in spanned columns where some are hidden

Posted by: ned.bahler on 16 November 2020, 4:18 pm EST

  • Posted 16 November 2020, 4:18 pm EST

    For some rows I am setting ColumnSpan to cross all columns where I have the first column frozen. I want the text value of the left-most column to span across these columns. The result is shown in Figure A. However, I allow the user to scroll to the right, hiding columns 2 through whatever as they do so. This results in the text having a portion truncated out as they scroll (see Figure B).
    Is there any way to prevent this other than programmatically detecting where the user is at in the horizontal scroll and resetting the ColumnSpan and Value properties of these cells accordingly?
  • Replied 17 November 2020, 11:39 pm EST

    Hi Ned,

    We apologize for any inconvenience caused to you.

    It is the expected behavior of Spread. You can also verify the same behavior in MS Excel.

    And also Spread doesn't provide any information related to scroll position. So, It won't be possible to change the cell span on scroll change.

    Please let us know if you need any further help.

    Regards,
    Kartik
  • Replied 18 November 2020, 9:36 am EST

    Kartik, thanks for the reply. I did try it in Excel and got the same result, as you mentioned. So I can't really fault Spread for not doing it differently.

    As for scrolling, for other reasons I'm not using the scrollbars on the Spread control itself but rather my own scrollbars and then programmatically scrolling the Spread worksheet based on that. So with that plus the ability to use GetViewportLeftColumn, I do have a way of effecting the behavior that I need; it will just a bit more work than I would have liked. In any case, thanks again.
  • Marked as Answer

    Replied 22 November 2020, 11:03 pm EST

    Hi Ned,

    Thanks for your understanding and it's good to know that you will be able to solve it using custom scrollbars.

    Regards,
    Kartik
Need extra support?

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

Learn More

Forum Channels