Posted 14 January 2022, 1:07 pm EST
Hi,
I’ve seen your sample fot FlexGrid and HTML content.
I’m trying to resize automatically the rows to adjust to the content.
Is it possible to do so?
Thanks
Forums Home / ComponentOne / WinForms Edition
Posted by: fsegui on 14 January 2022, 1:07 pm EST
Posted 14 January 2022, 1:07 pm EST
Hi,
I’ve seen your sample fot FlexGrid and HTML content.
I’m trying to resize automatically the rows to adjust to the content.
Is it possible to do so?
Thanks
Posted 14 January 2022, 2:23 pm EST
In addition, is it possible to show image inside html code?
Posted 17 January 2022, 8:00 am EST
Hi,
To automatically resize the Rows, you can calculate the height of the C1SuperLabel content used to render the HTML content and use it to adjust the height of the rows accordingly. If you want to use the Images in the HTML code, you can use the tag. You can either add the images in the C1SuperLabel.Images property and use its key as the source of the image or you can assign a disk location as the value of the src attribute of
tag. Please refer to the sample attached.
Regards,
Avnish
Posted 18 January 2022, 1:37 pm EST
Hi Avnish,
Thanks for your feedback. It works well.
If I have two columns with html content, how can I achieve that as well without always triggering the ownerdraw event?
I’ve updated your sample accordingly.
Posted 19 January 2022, 4:23 am EST
Hi,
Sorry for the inconvenience, an incorrect sample was attached.
You need to call the resize method outside the ownerdrawcell event. If you have multiple columns, then you can write your own method that calculates height taking into account all the columns. Please refer to the sample attached.
Regards
Avnish
HtmlGrid_mod_all.zip
Posted 19 January 2022, 5:04 am EST
Perfect!
Thanks for your quick feedback
Posted 20 January 2022, 6:55 am EST
Hi,
There is an issue with the latest version .537
Images are not displayed anymore.
See sample with nuget.HtmlGrid.zip
Posted 21 January 2022, 2:38 am EST
Hi,
We could see the behavior at our end and it seems like a bug. We have reported the issue to the development team and will let you know once we have an update.
[Tracking ID : C1WIN-26586]
Regards
Avnish
Posted 4 April 2022, 11:00 am EST
Hi,
Is this issue solved with 2022 v1?
Thanks
Best regards
Posted 4 April 2022, 11:13 pm EST
Hi,
The issue has been fixed in the latest 22v1 release. Please update your C1 controls to the 22v1 release using the C1ControlPanel.
Download: https://www.grapecity.com/componentone/download
If you face any issues, please let us know.
Regards
Avnish