<p>Hello,<br />
<br />
I'm experimenting with creating grids and tables in script using the elementFactory object. I've created a 1x1 grid like this:<br />
<br />
var elementFactory = reportContext.getDesignHandle().getElementFactory();<br />
var newGrid = elementFactory.newGridItem("NewGrid", 1, 1);<br />
<br />
Now I'm wondering if there's a way to add additional columns dynamically. For example, at some point (when I get the results of my dataset) I'm going to want to add n amount of items to my grid (because the dataset will have n rows). So I'll need to add n-1 additional columns to the grid.<br />
<br />
I've had a look at this website but I don't see any function for doing this:<br />
<br />
<a data-ipb='nomediaparse' href='
http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.birt.doc.isv/model/api/org/eclipse/birt/report/model/api/GridHandle.html'>http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.birt.doc.isv/model/api/org/eclipse/birt/report/model/api/GridHandle.html</a><br />
<br />
I see functions like pasteColum(...) and insertAndPasteColumn(...) but these seem to take a columnNumber, and since I want a <em class='bbc'>new</em> column, the columnNumber would be something out of bounds (the description of columnNumber says "columnNumber - the column index from 0 to the number of columns in the grid").<br />
<br />
Is there a way to accomplish what I want?</p>