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

Formatting Cells

Hi there,

I'm having a bit of trouble formatting cells on an ITable using VB.NET. I am populating my data into a Datatable and then importing the data into an ITable. I am then iterating through the ITable and formatting the cells with the appropriate font type. (Find Code Attached). What I would like to do is to apply another Font if the string "Not owned by COMPANY" is found in one of the cells. I thought that the following would work but I just keep gettign an empty string:

If (ComponentsTable.Rows(i).Cells(j).Value = "Not owned by COMPANY") Then
ComponentsTable.Rows(i).Cells(j).Style.TextFont = ChapterItalicsFontBoldRed
End If

Any ideas what I am doing wrong here?

Thanks



Code Snippet.zip

1 Reply

YG Yavanaarasi G Syncfusion Team April 18, 2008 01:35 PM UTC

Hi Dave,

Sorry for the delay in responding.

I am not able to reproduce the issue that you mentioned here. You had send only the code snippet. I had tried to run your code but not able to run it. I have created a simple sample and test this issue, here it works fine. Please refer the below code that I tried to reproduce it:


[VB]
If (table.Rows(i).Cells(i).Value = "Not owned by COMPANY") Then
table.Rows(i).Cells(i).Style.TextFont = ChapterBoldFont
End If


Please refer the sample in the below link:
http://websamples.syncfusion.com/samples/Pdffont.Zip


Please have a look at the above sample and if still the issue exists, could you please try reproducing it in the above sample and send us the modified sample so that we could sort out the cause of the issue and provide you a solution?

Regards,
G.Yavana



Loader.
Live Chat Icon For mobile
Up arrow icon