C1FlexGrid vs Webdings font

Posted by: ivan.stanojkovski on 3 August 2020, 6:02 pm EST

    • Post Options:
    • Link

    Posted 3 August 2020, 6:02 pm EST - Updated 3 October 2022, 2:42 pm EST

    Hi

    We have a small problem when using C1FlexGrid and the Webdings font.

    We want to display some images from the Webdings font in rows that have a height of 16 in C1FlexGrid. This works great on DataViewGrid, but when we want to display it in the same way in C1FlexGrid it is displayed truncated.

    Do you have any idea or suggestion on how to solve this problem.

    Best regards.

  • Posted 4 August 2020, 6:48 pm EST

    Hi Ivan,

    You can use the AutoSizeRows property of the FlexGrid to adjust the height of the rows to fit the data. The code snippet is given below:

    c1FlexGrid1.AutoSizeRows();
    
    

    Regards,

    Prabhat Sharma.

  • Posted 4 August 2020, 7:07 pm EST - Updated 3 October 2022, 2:42 pm EST

    Thanks Prabhat, but i don’t wont to achieve that.

    I wont fix height of 16, and the font to fit inside the row.



    The same way like its behave in DataGridView, can we achieve that?

    Best regards.

  • Posted 5 August 2020, 3:18 pm EST

    Hi Ivan,

    We can not face the difference at our end in FlexGrid and DataGridView. The characters appear in the cell as per their font size in both the grids. Please see the attached GIF which shows the same.

    If you are doing anything else then please modify the attached sample accordingly.

    Regards,

    Prabhat Sharma.

    WebDings.zip

  • Posted 5 August 2020, 6:00 pm EST - Updated 3 October 2022, 2:42 pm EST

    Excellent Prabhat

    Now just enlarge font from 8 to 14 and you will see the difference.

    You will see that the C1FlexGrid truncate the font, and DataGridView fits the font in the row.

  • Posted 6 August 2020, 9:46 pm EST - Updated 3 October 2022, 2:42 pm EST

    Hi Ivan,

    Yes, I too can observe the difference between both the controls but the characters are not fully visible in datagridview with RowHeight 16 and Font size 14 too. Please see the attached screenshots for reference.

    So either you have to set the font size according to the Row height or set the row height according to the font size.

    Regards,

    Prabhat Sharma.

  • Posted 9 August 2020, 3:38 am EST - Updated 3 October 2022, 2:42 pm EST

    Hi Prabhat

    Don’t worry, I solve this on completely other way, because non other way is acceptable for us in this moment with C1FlexGrid.

    A draw a “combined” image inside a cell.



    Thanks anyway

Need extra support?

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

Learn More

Forum Channels