Peter K
|
Posted: 11/08/2003, 11:48 AM |
|
I have a grid that contains several columns of data that I would like to show the text column from a bound column. Except I don't want to change the column type to listbox.
Is there an easy way to decode the value of the column as a text field?
I hope this makes sense. If not, I will provide more details on request.
I am using PHP with MySQL.
|
|
|
Hamilton
|
Posted: 11/08/2003, 7:34 PM |
|
The easiest way to perform this is to change the link to a label control.
In the Before_Show event do the following;
Dim lngRecordID
Dim sWebsite
Dim sEmail
Dim sResult
lngRecordID = Users.DataSource.Recordset.Fields("user_id")
sWebsite = Users.DataSource.Recordset.Fields("Website")
sEmail = Users.DataSource.Recordset.Fields("Email")
If Len(sWebsite) > 0 then sResult = sWebsite
If Len(sEmail) > 0 Then sResult = sEmail
'Or modify this to accomdate if the user provided both
If Len(sWebsite) > 0 AND Len(sEmail) > 0 Then
sResult = sWebsite & "<BR>" & sEmail
End If
Users.lblEContact.value = sResult
_________________
Hamilton
www.dataobjx.net
|
|
|
Peter K
|
Posted: 11/09/2003, 2:19 AM |
|
How about PHP code? That is what I am using.
|
|
|
DaveRexel
|
Posted: 11/09/2003, 2:30 AM |
|
::
Try using the following generic CCS function (PHP example here) in the BeforeShowRow Event for your grid
CCDLookUp(field, table, where_clause, connection)
Hope this helps
Greetings
Dave
RexDesign CodeCharge Studio Tutorials http://www.rexdesign.com/ccs/default.php
|
|
|
|