Fit into cell

Posted by: silkkeng-fp on 8 September 2017, 1:54 pm EST

  • Posted 8 September 2017, 1:54 pm EST


    Is there a way to determine if the text in a cell is fit into the cell?

    E.g. a multi-line,word wrap cell text has 1000 line of word and doesn't fit into cell, only first few word are display depending on row height and column width.

    A single short text fit into cell when columnwidth > getpreferredwidth.


  • Replied 8 September 2017, 1:54 pm EST


    You can use the MeasureString method of the Graphics class to measure the text. Then you should know if the text will fit in the rectangle of the cell.

Need extra support?

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

Learn More

Forum Channels