rla
Posts: 18
|
Posted: 01/10/2014, 8:46 PM |
|
Hi,
I have a sql query that populates a textbox in a row of a grid but is not part of the database. I want to use it in a url and when I go to parameters I tried several types but none are able to get the value in that row $Container->Conn2->GetValue() since it isn't in the database. (tried form and expression).
Anyone have a tip on how I can add a textbox not in the db as a link parameter when using a grid?
Thanks
|
|
|
eratech
Posts: 513
|
Posted: 01/10/2014, 10:34 PM |
|
Hi rla - it might depend on where you are putting the code that collects the textbox value.
What Event are you putting the code in (and what code are you using)? (eg: AfterInsert on the Record, or something else)
Cheers
Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia |
|
|
Lucius
Posts: 220
|
Posted: 01/11/2014, 2:30 AM |
|
Hi rla,
Quote :I have a sql query that populates a textbox in a row of a grid but is not part of the database.
This is clear, so you most likely use BeforeShowRow event to populate this value correctly for each row.
Quote : I want to use it in a url and when I go to parameters
This is something I don't understand. what exactly you want to do here? Use sql query in url?
|
|
|
rla
Posts: 18
|
Posted: 01/11/2014, 3:30 AM |
|
Hi,
Yes I am using "Before Show" event to populate the field. The value shows the uniqueid for the record/link I want to go to (I use SQL since there are rules to find it more complex than standard dlookup has). The value does show in the field (I have it visible while debugging) and want to use that variable in the url link.
http://www.examplelink.com/CustomerView.pnp?CustomerID={TEMPGID}
Where {TEMPGID} is the value that is returned by the SQL and put into the field.
I had thought by using Href Source - Link, Parameters and adding an expression of $Container->TEMPGID->GetValue() would have done it, but apparently it is not the correct method.
Any help is greatly appreciated....
|
|
|
rla
Posts: 18
|
Posted: 01/11/2014, 3:30 AM |
|
|
|
|
Lucius
Posts: 220
|
Posted: 01/11/2014, 10:48 AM |
|
Hi rla,
Use the Link control without connection to the DB and within code (BeforeShowRow) to the following:
$Grid->Link->SetLink( $your_link );
|
|
|
|