Hi,
I have a database in 3rd normal form; simplistic structures as follows;
branch:
branchid integer,
salesrepid integer,
branchaddress char(255);
salesrep:
salesrepid integer,
salesrepname char(50);
When I display the table of branches, it shows the sales rep ids, not their names.
I need the sales rep ids in there so that I can record updates, but I only want the customer to see the sales rep name.
Using JSON, the colmodel for the branch sales rep is as follows;
{name:'salesrep',index:'salesrep', width:90, editable: true, edittype:”select”, editoptions:{value:”0:Fred;1:George;2:Noah”} },
So from this, I'd like the customer to see Fred, George and Noah as drop down options (this works), and when the customer just looks at the list of branches, he sees the correct foreign key reference – Fred, George or Noah as appropriate, and NOT 0,1 or 2, which is what happens at present.
What am I doing wrong?
Regards,
Pete.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top