Hi Tony,
using this option “formatter:'select', ” in the colmodel make the difference, now it show exactly the Value and not the ID; in my example it show “CREDIT CARD” and not “2”.
OK, but the problem I'm getting now is for searching and for editing…
For searching: I am making search with the value and not the ID, I'm looking for all orders done with “CREDIT CARD” and the database contain an ID for this column, so the search string the user type contain “CREDIT CARD” and not “2” and no records can be found
For Editing: The grid actually show a combobox for the value, but it's not showing the current record value, it's showing the list from the beginning. If the order has been done with CREDIT CARD, it means it's the second value in the combo, however it always show “CASH” for any record I'm editing. For two elements will be not a problem, for many and many this could be a problem for the user memory….
Thanks
Max
Hi Tony,
no, it's not a lack of time…
The coltype for column Payment_id is declared in this way:
|
1 |
{name:'fk_id_payment',index:'fk_id_ |
|
1 |
payment |
', editable: true,edittype:"select", editoptions:{value:"1:CASH;2:CREDIT CARD;"}},
But in my tests using all features I found always this result:
ORDER_ID | NAME | PAYMENT_ID
567 -> SMITH -> 1
789 -> FOO -> 2
If I can I will post a sample page with code to show you.
Thanks
Max
Hi Tony,
in the past I've used this javascript function to put appropriate values into other form fields:
Hi Tony,
thanks for your reply!
I don't want to create a dependent combo box, I would like to split values for a single combo in different columns.
Please consider this classic example (modified of course):
{name:'ship_sel',index:'ship_sel', editable: true,edittype:”select”,editoptions:{value:”FE:FedEx;IN:InTime;TN:TNT;AR:ARAMEX”}},
{name:'ship_id',index:'ship_id'},
{name:'ship_value',index:'ship_value'},
I want to put the “FE” value in an “ID Column”, in this case ship_id
and the “FedEx” value in a “Value Column”, in this case ship_value
My “ship_sel” combobox will be a third column and is created with a PHP code based on decode table, so I want to create a selection combo and use the selected value to populate different columns. This seems to be difficult also for Select/Update/Delete operations, right?
I hope to clarified my question now
Thank you
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top