sneakers
Posts: 13
|
Posted: 03/31/2004, 8:01 AM |
|
I am using a check box list and want to modify the value of {Description}. How do I modify this for each checkbox before the page is displayed. I have tried everything that I can think of.
|
|
|
srinivas
Posts: 54
|
Posted: 03/31/2004, 8:59 AM |
|
If you are implying to display some "discription" next to the checkbox, say in a grid, you may add a label next to the CHECBOX control and then use Grid's Before Show Row event to set the DESCRIPTION to what ever you want.
-Srinivas
|
|
|
peterr
Posts: 5971
|
Posted: 03/31/2004, 2:42 PM |
|
The {Description} is populated automatically from the database. Simply specify the table in the "Data Source" property, then select the Bound Column and Text Column fields.
Alternatively select "ListOfValue" in the "Data Source Type" property and in the "Data Source" property enter your list, for example: "1;Yes;2;No"
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
sneakers
Posts: 13
|
Posted: 04/02/2004, 7:55 AM |
|
I am populating the {Description} from a database field. Everything is displaying correctly. I want to modify the value of {Description} with some html formatting before it is displayed. I don't know how to access the variable.
Please note that this is a checkbox LIST.
|
|
|
sebastian
Posts: 15
|
Posted: 04/02/2004, 1:44 PM |
|
The control's values are stored in the Values property of the object, so you need to alter them in the control's BeforeShow event. The property stores arrays. Index 1 of each of the arrays stores the description.
Try using:
global $formname;
if (is_array($formname->controlname->Values))
{
for ($o=0; $o<count($formname->controlname->Values);$o++)
{
$formname->controlname->Values[$o][1]=$formname->controlname->Values[$o][1]." modified";
}
}
Sebastian
|
|
|
sneakers
Posts: 13
|
Posted: 04/05/2004, 9:29 AM |
|
Thank you, Thank you, Thank you.
|
|
|