We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

GridFontInfo underline

G''day, I am exporting to excel using ExcelRW, and the code I have copies the Grid''s table style to the excel workbook''s table style before looping through all of the rows/cols. When copying that first style, we check the GridStyleInfo.Font.HasUnderline property - if it is true, we set the the underline property of the excel sheet to Single. However, I just noticed that the HasUnderline property is true - however the Underline property is false. Since we check HasUnderline, and then set an enum value in the excel sheet, the Underline property is ignored. Is this a bug? Has something been set wrong? Why do we have a HasUnderline for a boolean property anyway? I have attached an image showing the QuickWhatch of the style in Visual Studio. Cheers.

GridStyleInfo.Font discrepencies.zip

1 Reply

AD Administrator Syncfusion Team November 1, 2005 02:17 AM UTC

HasUnderline being set to true just means that style.Font.UnderLine has been explicitly set to something, either true or false. It does not mean that style.Font.UnderLine has to be true true. You will have to check style.Font.UnderLine directly to test if it is set to true.

Loader.
Live Chat Icon For mobile
Up arrow icon