In a previous post I asked how to get bubble help into column headings. I've done that, but now I need to customize some of the help at run time, and it's not working.
I am trying to update a column heading title text at run time. The example below is simplified, but demonstrates the issue.
In one of my column headings, I have this:
<span title="|Flag1|">No<br>CAGE<br>Code<br/></span>
This correctly sets up a column heading with a bubble help that says |Flag1|
But I don't want it to say Flag1, so ...
In the ontitlesrender event, I have the following script:
e.gridTitles = stritran(e.gridTitles, "|Flag1|", "Test")
This should replace the Flag1 in the gridtitles, with the word test, but it does not. (Note _ will ultimately update this with data from a table, but for testing purposes ...)
in the onrowsrender event, I am already using a similar script successfully.
e.currentRowHTML = stritran(e.currentRowHTML, e.rtc.helparray[1].flagHelpKey, e.rtc.helparray[1].flagdef)
This code successfully converts all my bubble help on each row from markers to actual help from a SQL table. (the array is loaded on gridinitialize)
All I did was change currentrow to gridTitles. It looks like it should work to me, but I'm obviously mistaken!
I'm thinking that the ontitlesrender event doesn't work similarly enough to the onrowrender, but I don't know what I'm doing incorrectly.
I am trying to update a column heading title text at run time. The example below is simplified, but demonstrates the issue.
In one of my column headings, I have this:
<span title="|Flag1|">No<br>CAGE<br>Code<br/></span>
This correctly sets up a column heading with a bubble help that says |Flag1|
But I don't want it to say Flag1, so ...
In the ontitlesrender event, I have the following script:
e.gridTitles = stritran(e.gridTitles, "|Flag1|", "Test")
This should replace the Flag1 in the gridtitles, with the word test, but it does not. (Note _ will ultimately update this with data from a table, but for testing purposes ...)
in the onrowsrender event, I am already using a similar script successfully.
e.currentRowHTML = stritran(e.currentRowHTML, e.rtc.helparray[1].flagHelpKey, e.rtc.helparray[1].flagdef)
This code successfully converts all my bubble help on each row from markers to actual help from a SQL table. (the array is loaded on gridinitialize)
All I did was change currentrow to gridTitles. It looks like it should work to me, but I'm obviously mistaken!
I'm thinking that the ontitlesrender event doesn't work similarly enough to the onrowrender, but I don't know what I'm doing incorrectly.
Comment