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)
Getting value of cell in Grid
prashbn
Hi,
I have a grid to which I have assigned a Data Set. I have added a row which consists of 4 cells. In one of the cells I have added a Data element to which I bind one column of the Data Set. In another cell, I have created a Text field. This text field should have a value based in the value in the Data Element.
I have written a script for the text field on the OnCreate and OnRender event.
if(this.getParent().getParent().getUserPropertyValue("Act") == 0){
this.getStyle().color = "Orange"
this.text = "Area to explore"
}
"Act" is the display name of the Date element. I am not able to get the value of the data element.
Please let me know how this can be done.
Thanks,
Prashant
Find more posts tagged with
Comments
mwilliams
Hi Prashant,
If using a standard text element, you'd need to do something like:
<value-of>row["Act"]</value-of>
Make sure the text element has HTML selected from the drop down.
If using a dynamic text element, you'd simply need to use:
row["Act"]
Hope this helps.
prashbn
Hi Michael, Thanks for the reply. I am not able to use the <value-of> option in the text field as the available data sets option does not come up in the expression builder.
What I really want to do is set the value of the text field based on the value in another cell. I think that can only be achieved by a script. Please let me know if I need to do it differently.
Thanks,
Prashant
prashbn
One finding, it seems to me that "row[Act]" works only within a table and not within a grid. The column bindings that are available for a text field within a table do not exist for a text field within a grid.
Is that a defect or expected behaviour?
mwilliams
Is your grid bound to the dataSet? If you can attach your report and describe what you're trying to do based on what I'll see in the design, I'll try to either modify it or give you more exact instructions on what I think you can do.