ckroon
Posts: 869
|
| Posted: 05/11/2009, 2:43 PM |
|
I have an editable grid showing four rows.. so on Insert it will enter 4 records.
I need to set the value of Listbox1 for each row to be A, B, C and D consecutively.
I can do a Before Show Row but how do I tell it to look at the previous row for the value, then go to the next? Or is there an easier way?
Thanks!
_________________
Walter Kempees...you are dearly missed. |
 |
 |
melvyn
Posts: 333
|
| Posted: 05/11/2009, 4:14 PM |
|
Remember BeforeShowRow is a server side event.
if(strlen($listbox_value) == 0){ // there's no parent row, this is the first one.
$listbox_value = <do something>;
}else{
//
}
// This will take the value from the current row and store it in $listbox_value.
$listbox_value = $Component->listbox->GetValue();
if($listbox_value == <your conditions here>){
$listbox_value = <calculate something>;
// set the row listbox value taken from the above calculations
$Component->listbox->SetValue($listbox_value);
}else{
// do something
}
The above illustrate and provides some mockup. You need to implement and get it working.
_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com |
 |
 |
|