View Single Post
Old May 8th, 2019, 01:05 PM
jpmiller jpmiller is offline
Junior Community Member
Join Date: Dec 2016
Location: Jacksonville, FL
Posts: 19
Smile Row Shading in Table


I am trying to set my row shading to be every two rows. The problem I am having is that the first row starts shaded then the every two row pattern starts.
How do I get the shading to be correct?

This is the bit of code I am using to set the Shading Pattern:

for (var c = 0; c < numColumns; c++)
var cell = row.Cells[c];
cell.HAlign = "Center";
cell.SetBorders("Thin", "Black", "Top", "Bottom", "Left", "Right");
cell.Margins = { Top:45, Bottom:45, Left:20, Right:20 };

if (boxNum == 0)
cell.TextColor = "White";
cell.ShadeColor = "Black";
cell.ShadePct = 100;

table.ShadingColor1 = "Black";
table.ShadingPct1 = 30;
table.ShadingRepeat1 = 2;
table.ShadingColor2 = "White";
table.ShadingRepeat2 = 2;
table.ShadingType = "ByRow";

return table.MakeTags();

I have also included a screenshot.
Thank you for your help.
Attached Images
File Type: png worksheet.png (41.0 KB, 9 views)
Attached Files
File Type: pdf VDP WorksheetNEW.pdf (150.0 KB, 6 views)
File Type: zip test (74.2 KB, 6 views)
Reply With Quote