Need a trick to display cellTitle for just one column in tablePane
I need a trick to display the cellTitle for just ONE column in a tablePane with a unique value. Here are the issues:
1. OnDrawCell has access to the cell data for that row/column, in %query(pName), but setting the cellTitle property to a column doesn't refresh the column object
2. Setting showValueInTooltip is good for the entire table, not just one cell
3. ** the column element does not evaluate zen expressions, so I can't say cellTitle="#(%query.Comment)#", for example. That's the crux of the problem.
tableName="MyTable"
orderByClause="ID DESC"
#2 showValueInToolTip displays the tool tip for ALL cells
showValueInTooltip="true" (Note: this shows the tool tip for EVERY cell)
<column colName="ID" colExpression="ID" hidden="true" />
<more columns here>
#3 - does not evaluate zen expression in <column> element; works with plain text though (cellTitle="Comment here")
<column colName="Comment" header="Comment" OnDrawCell="onDrawCell" cellTitle="#(%query.Comment)#" />
</tablePane>
#1 OnDrawCell has access to the %query object, but not the column object. This code doesn't set each cellTitle to the value for that cell in the row; just sets them all to the last value...
{
//Draw the comment column as an extract of the comment
if (pName = "Comment") {
set comment = ..EscapeHTML(%query(pName))
set line = $e(comment,1,49)
write line_" ..."
//this doesn't really work
set colCount = pTable.columns.Count()
set col = pTable.columns.GetAt(colCount) //get last column, the Comment column
set col.cellTitle = %query(pName)
set ok = pTable.columns.SetAt(col,colCount)
}
quit $$$OK
}
Elsewhere I have access to the column objects (not the same as the value in each cell), but not the query values.
I dont treally want to write out the whole table using html or by adding elements programattically, since the tablePane is so convenient for this situation.
Goal:
ID column A columnB Comment
1 hi 1/23/14 ... (tooltip = "Hello!")
2 no 4/15/16 ... (tootip = "I entered a comment")
3 blah 9/4/15 ... (tootip = "today I did something")
Thanks,
Laura