jono
Posts: 1
|
Posted: 01/29/2010, 3:09 PM |
|
For the life of me, I cannot figure out why this does not work.
I have a grid. the column captions I changed to Link controls. (named HeaderLink_COL1 for instance). It currently has static text (the word "header"). I want to change the test of the link to something else (let's say..."Proposal 1"). In the before show event of the grid, I have the following code:
BALLOT_MATRIX.HeaderLink_COL1.Page = "proposal_edit.asp"
BALLOT_MATRIX.HeaderLink_COL1.Parameters = CCAddParam(BALLOT_MATRIX.HeaderLink_COL1.Parameters, "PROPOSAL_ID", "1")
BALLOT_MATRIX.HeaderLink_COL1.Value = "Proposal 1"
The text of the link does not change...howver the page and parameters do.
I have tried putting this same code in the BeforeShow event of the control as well...and still have the same result.
What am I doing wrong here??
|
|
|
andrewi
Posts: 162
|
Posted: 01/31/2010, 4:29 PM |
|
The help file isn't clear about this (Welcome to Codecharge!), but Static text will do as the option says: it will never change. (if you look at the HTML, you'll see it's literal text between the <a> tags, not a {placeholder} )
When you insert the link control choose "Text from the Database" instead of "Static Text". Leave the drop-down list blank.
Then in the link's BeforeShow event you can put the BALLOT_MATRIX.HeaderLink_COL1.Value ="Proposal 1" and it should work. (in the HTML you'll note that there is a placeholder - like {LinkName} - for the link text between the <a> tags.)
|
|
|
|