dynamically adding new columns to scripted grid from elementFactory [message #1165842] |
Fri, 01 November 2013 15:34  |
Gibran Shah Messages: 33 Registered: September 2013 |
Member |
|
|
Hello,
I'm experimenting with creating grids and tables in script using the elementFactory object. I've created a 1x1 grid like this:
var elementFactory = reportContext.getDesignHandle().getElementFactory();
var newGrid = elementFactory.newGridItem("NewGrid", 1, 1);
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.
I've had a look at this website but I don't see any function for doing this:
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.birt.doc.isv%2Fmodel%2Fapi%2Forg%2Feclipse%2Fbirt%2Freport%2Fmodel%2Fapi%2FGridHandle.html
I see functions like pasteColum(...) and insertAndPasteColumn(...) but these seem to take a columnNumber, and since I want a new 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").
Is there a way to accomplish what I want?
[Updated on: Fri, 01 November 2013 15:37] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.01812 seconds