ConditionalFormattingStyle is not accessable

I'm trying to create a banded table where the odd rows are shaded.

The following code which I copied from the documentation cannot be compiled.
Visual Studio claims that ConditionalFormattingStyle is inaccessible due to its protection level and that tableStyle does not have the member ConditionalFormattingStyles.


using Syncfusion.DocIO;
using Syncfusion.DocIO.DLS;

WTableStyle tableStyle = table.GetStyle() as WTableStyle;

ConditionalFormattingStyle oddRowBandingStyle = tableStyle.ConditionalFormattingStyles.Add(ConditionalFormattingType.OddRowBanding);

oddRowBandingStyle.CellProperties.BackColor = Color.WhiteSmoke;


What am I doing wrong?



1 Reply 1 reply marked as answer

MR Manikandan Ravichandran Syncfusion Team September 11, 2020 05:39 PM UTC

Hi Benny,

Thank you for contacting Syncfusion support.

We have provided the Custom table style support in DocIO from the version 17.3.0.14 (Volume 3 Main release). From the given details, we have suspect that you are using the lower version from this version. So, we suggest you to upgrade the packages to latest version and then apply custom style to the table.

Please refer the below UG link to know mora about custom table style.
https://help.syncfusion.com/file-formats/docio/working-with-tables?cs-save-lang=1&cs-lang=csharp#custom-table-style

Please find the release note from below.
https://help.syncfusion.com/windowsforms/release-notes/v17.3.0.14?type=all#DocIO-features

You can download the packages from the below link.
https://www.nuget.org/packages/Syncfusion.DocIORenderer.Net.Core/18.2.0.57

Please find the sample from the below kink.
https://www.syncfusion.com/downloads/support/forum/157780/ze/CustomTableStyle-1859624330

Please let us know if you have any other questions.

Regards,
Manikandan Ravichandran 


Marked as answer
Loader.
Up arrow icon