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

changing height/padding of a row/cell does not worl if using "table.ApplyStyle(BuiltinTableStyle.TableList3);"

changing  height/paddingof a row/cell does not worl if using "table.ApplyStyle(BuiltinTableStyle.TableList3);" additionally I use " format.IsAutoResized = true;". What to do here ?

1 Reply

AK Ayswarya Krishna Kumar Syncfusion Team October 27, 2016 10:25 AM UTC

Hi Customer,

Thank you for contacting Syncfusion support.

We suspect that you have missed disabling the boolean flag ‘
SamePaddingsAsTable. This flag represents the Microsoft Word’s cell options - “Same as the whole table’. Before to set the cell paddings via cell options it is un check this option. Please refer the below screenshot for more clear understanding.


Please find the below code snippet for accessing the ‘
SamePaddingsAsTable option to set the paddings for the table cell.

//Creates Word document instance 
WordDocument document = new WordDocument(); 
//Appends a section with an empty paragraph 
//Adds the table to the last section 
WTable table = document.LastSection.AddTable() as WTable; 
//Sets the table with 3 rows and 3 columns 
table.ResetCells(3, 3); 
//Applies table built in style - TableList3 
//Applies padding to complete table 
table.TableFormat.Paddings.Left = 10; 
//Disables the MS Word flag 'Same as the whole table' option 
table.Rows[0].Cells[0].CellFormat.SamePaddingsAsTable = false; 
//Applies the padding to the current row via cell 
table.Rows[0].Cells[0].CellFormat.Paddings.Left = 5; 
//Saves the document 
//Closes the document instance 

Note: If you could still reproduce the issue at your end, please provide us the sample that reproduce the issue, along with the Word document you are using, if any? So that we could analyze further and could provide you more appropriate details at the earliest.


Live Chat Icon For mobile
Up arrow icon