Possible to have a select field in list-view?
Posted: Wed May 21, 2008 8:44 am
Hi steve, hi all,
Using the version 1.0 beta-1 now for my second application and like the new functionality very much. Thanks for that steve.
I now would like to have a select (drop-down) field in list view. It should be filled with values from a set-field in my db and I would like to recieve calculated values (float) in another field of that table in list view depending on the value I choose from that select.
I did something like
in my tables delegate class which gives me somehow a select field with the example values in list view. The only thing is, if I click on the select I will be redirected to the details view of that record.
What do I have to add?
The second question is: Can I have the SET-Values from my database as option-values directly in that select-field or do I have to use a valuelist instead?
Thanks for any hint
Markus
Using the version 1.0 beta-1 now for my second application and like the new functionality very much. Thanks for that steve.
I now would like to have a select (drop-down) field in list view. It should be filled with values from a set-field in my db and I would like to recieve calculated values (float) in another field of that table in list view depending on the value I choose from that select.
I did something like
- Code: Select all
function r_unit__renderCell(&$record){
if ($record->strval('r_unit')){
$r_unit = $record->display('r_unit');
/*return $record->display('r_unit');*/
return "<select name=\"r_unit\" id=\"r_unit\" size=\"1\"><option>$r_unit</option><option>value 2</option><option>value 3</option></select>";
}
}
in my tables delegate class which gives me somehow a select field with the example values in list view. The only thing is, if I click on the select I will be redirected to the details view of that record.
What do I have to add?
The second question is: Can I have the SET-Values from my database as option-values directly in that select-field or do I have to use a valuelist instead?
Thanks for any hint
Markus