knackje
Posts: 30
|
| Posted: 06/25/2007, 1:16 AM |
|
Hi all,
I'm a newbie with php, and have a question how to code the following problem:
In an editeble grid, how to:
set a value based on another field like the example below
colum1: integer
cloum2: integer
colum3: integer
if (column1 - column2) = 40 then column3 = 1
else 0
tnx in advanced, hope someone can help me with this.
|
 |
 |
mamboBROWN
Posts: 1713
|
| Posted: 06/25/2007, 2:45 PM |
|
knackje
Here is a example from the CCS example pack. Maybe it can help you: http://examples.codecharge.com/CCSExamplePack2/Dependen...entListBox3.php
|
 |
 |
knackje
Posts: 30
|
| Posted: 06/25/2007, 10:51 PM |
|
hi mambobrown
tnx fot helping! I read the example, but it is not exact what i mean. The expression in de example is hard coded. I shall explain my thinking, with an other example:
Example:
table1: year, start_money, first_pay, second_pay, third_pay
table2: year, min_payment --> exaple values (2007, 40)
Datagrid1:
datasource: table 1
table1.textbox1: start_money
table1.textbox2: first_pay
table1.textbox3: second_pay
checbox1: depends!
checkbox1: checked or not, depends on the total amount of money of the first and second payment. It must be more then table2.min_payment. So in this example more then 40.
So i was thinking somithing like the following code:
----------------------------------------------------------
in the before shown event:
if
(table1.textbox1 + table1.textbox2) > select max(year), min_payment from table2
then grid1.checkbox1 = 1
end if
-----------------------------------------------------
Hope you or maybe someelse can help me with this. tnx in advanced.
|
 |
 |
knackje
Posts: 30
|
| Posted: 07/03/2007, 12:02 AM |
|
Can anyone help me?
tnx...
|
 |
 |
|