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)
finding element position in Grid
ShlomiW
<p>Hi all,</p><p> </p><p>I need to find an element postion in a grid and then to insret a new element after that one that I found.</p><p> </p><p>For example:</p><p>I have the following grid:</p><p>Grid - Grid 1</p><p> Row</p><p> Cell</p><p> Text - Text 1</p><p> Text - Text 2</p><p> </p><p>*this is a grid with 1 row and 1 column and 2 text elements</p><p>the grid name is "Grid 1" and the text elements names are "Text 1" and "Text 2".</p><p> </p><p>I know that I can use this line</p><pre class="_prettyXprint _lang-">reportContext.getDesignHandle().findElement("Grid 1")</pre><p>in order to find the grid, but I don't know how I can find what is the position of "Text 1" inside the grid element.</p><p> </p><p>What I'm trying to do is to add a new element between the 2 text element so that my grid will look like:</p><p>Grid - Grid 1</p><p> Row</p><p> Cell</p><p> Text - Text 1</p><p> Text - New Text</p><p> Text - Text 2</p><p> </p><p>so I'm thinking of find that position of "Text 1" and then to add my new element in "Text 1" position + 1.</p><p> </p><p>do you have any ides how can I do that? or any ideas for a btter way to achieve what I need?</p><p> </p><p>Thank you all</p><p>Shlomi</p>
Find more posts tagged with
Comments
BRM
<p>Are you trying to add this new grid conditionally? i.e. based on some set of circumstances in the data? If that is the case then it might be a lot easier to add the grid in the designer and hide it when the conditions that cause it to show are not met.</p>
ShlomiW
<p>This is more complex then that, because I'm building the entire thing (grid and data-set) at rum time based on information that I don't know when I' building my report.</p>
kclark
<p>Are you trying to do this from the designer or are you writing Java code to do this?</p>
ShlomiW
<p>from the designer, but using Server side Java-script</p>
ShlomiW
<p>Anyone has any ideas how I can do that??</p>