Hi,<br />
<br />
using Birt 2.6.2 I want with a Javascript, manually set data in a grid element outside onPrepare().<br />
<br />
During the onCreate() of a Label I can change the value easily<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
this.text = myVar;
</pre>
<br />
During the onCreate() of a Grid I can't change the value of that Label.<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
var factory = reportContext.getReportRunnable().designHandle.getElementFactory();
var grid = reportContext.getDesignHandle().findElement("MyGrid");
for (var i = 0; i < myRows;i++) {
row = grid.getRows().get(i); //RowHandle
cell1 = row.getCells().get(1); //CellHandle
slot1 = cell1.getContent(); //SlotHandle
lbl1 = slot1.getContents() //LabelHandle Array?
deh1 = slot1.get(0); //LabelHandle DesignElementHandle
deh1.getText(); // Gets the initial value. Works!
deh1.setText("MY NEW VALUE");
deh1.getText(); // Gets the new value. Works!
logToDebugWindow(i + " : " + deh1.getText() ); // Shows the new value in a debug window
);
</pre>
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/org/forum/public/style_emoticons/'>http://www.birt-exchange.org/org/forum/public/style_emoticons/</a><#EMO_DIR#>/confused.gif <br />
But in the report I only see the initial text, set during onPrepare() <br />
and not "MY NEW VALUE" set during onCreate().<br />
<br />
<br />
Why is the changing of a label text only working in the onCreate of the Label and not in the onCreate of its Grid ?<br />
<br />
regards<br />
germobirt