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

How can I customize DocIO TableStyles?

Hi,
I need to use some table styling features likeIWTable.ApplyStyleForFirstColumn andIWTable.ApplyStyleForBandedRows, but with my own color scheme and font settings. How can I do this? I searched for a way to supply my own IWTableStyle, but could not find anything.
Thanks for your help,
Adrian

P.S.: I misselected the tag for this thread. My question refers of course to DocIO WordDocument generation, not to the PDFViewer.

3 Replies

KC Karthikeyan Chandrasekar Syncfusion Team December 21, 2018 02:19 AM

Hi Adrian, 
Currently DocIO doesn’t exposed API to apply conditional formatting for the table. We have already logged this as a feature request in our database. We don’t have any immediate plans to implement this feature. At the planning stage for every release cycle, we review all open features.  We will let you know when this feature is implemented. 
Regards, 
Karthikeyan  



AG Adrian Grigore December 21, 2018 04:11 AM

Hi Karthikeyan,

thanks for your reply. 

So, in this case, what are my options for styling a bunch of tables in a long document in my own corporate color scheme? 

The only way I have found so far is to set the style of each cell or row explicitly, but the way I understand it that would duplicate styling information and overly bloat the document. 

In other words: It is possible to add my own paragraph style to the document and apply the same style to multiple paragraphs just by referencing the name. Isn't there something similar available for tables?

Thanks,

Adrian 


DB Dilli Babu Nandha Gopal Syncfusion Team December 24, 2018 11:58 AM

Hi Adrian, 
 
In Word document, we can define the following conditional formattings within a table style:
   1. Whole table
   2. Banded columns, even column banding
   3. Banded rows, even row banding
   4. First row, last row
   5. First column, last column
   6. Top left, top right, bottom left, bottom right.

Please refer the specification of Word document from the below link:
http://officeopenxml.com/WPstyleTableStylesCond.php 

The conditional formattings from table style are applied to a table based on following properties (defined in the table): 
 
·         ApplyStyleForBandedColumns  
·         ApplyStyleForBandedRows  
·         ApplyStyleForFirstColumn  
·         ApplyStyleForHeaderRow  
·         ApplyStyleForLastColumn  
·         ApplyStyleForLastRow  
These APIs are specific to each table so, you cannot modify in table style. Please refer the below screenshot for the similar options in Microsoft Word application:

 
 
  
  
  

Please refer the below UG documentation to know more about how to apply table style options in Word document using DocIO:
https://help.syncfusion.com/file-formats/docio/working-with-tables#table-style-options 

We have APIs to set built in styles and the table style options in the Word document. At present, DocIO doesn’t have API to edit the existing table style and to define customer table styles. As mentioned in our previous update, we already considered these scenarios in our feature request and we will let you know once it is implemented. 
 
 
Regards, 
Dilli babu 


Loader.
Live Chat Icon For mobile
Up arrow icon