Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
borders not being set right on grid cell
gib65
<p>Hello,</p><p> </p><p>I'm trying to create a grid manually in the beforeFactory script. I'm having a bit of an issue with the cell borders.</p><p> </p><p>Here's my script:</p><p> </p><p>var elementFactory = reportContext.getDesignHandle().getElementFactory();</p><p>var newGrid = elementFactory.newGridItem("NewGrid", 1, 1);</p><p>newGrid.setProperty("marginTop", "100px");
newGrid.setProperty("marginLeft", "1px");</p><p>var cell1 = newGrid.getCell(1, 1);</p><p>setBorders(cell1);</p><p>var newLabel1 = elementFactory.newLabel("label1");
newLabel1.setText("label1");
cell1.getContent().add(newLabel1);</p><p>reportContext.getDesignHandle().getBody().add(newGrid);</p><p>function setBorders(cell)
{
cell.setProperty("borderBottomStyle", "solid");
cell.setProperty("borderBottomWidth", "1px");
cell.setProperty("borderBottomColor", "#000000");</p><p> cell.setProperty("borderLeftStyle", "solid");
cell.setProperty("borderLeftWidth", "1px");
cell.setProperty("borderLeftColor", "#000000");</p><p> cell.setProperty("borderRightStyle", "solid");
cell.setProperty("borderRightWidth", "1px");
cell.setProperty("borderRightColor", "#000000");
cell.setProperty("borderTopStyle", "solid");
cell.setProperty("borderTopWidth", "1px");
cell.setProperty("borderTopColor", "#000000");
}</p><p> </p><p>The setBorders function would seem to set a 1px border on all sides of the cell but as you can see from the screen capture below, it doesn't:</p><p> </p><p>
Find more posts tagged with
Comments
mwilliams
<p>For some reason, clicking on the image in the post isn't expanding it for me. From the thumbnail, it appears to be working correctly. Can you describe what isn't looking like you expect?</p>