Forum


23:51

14/11/2008

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.
00:18

14/11/2008

06:54

13/11/2008

Hi Barry,
The method I mentioned for Pete was setting a column with the needed id. If you are talking about the problem with the select input (Post returns value as it should but then when we load value, it displays value and not label 🙁 ) I had to do some serverside juggling to display the results correctly.
Cheers,
P.
Most Users Ever Online: 715
Currently Online:
47 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66