Forum



04:59

14/01/2010

Hi,
I would like 2 know if it possible: I hv 2 linked table from db let say tbl_A and tbl_B,
which is linked through let say prod_code
so what i hv in mind is .. jqgrd will grab new product id from a form which will be submitted to grid.. so grid will generate a datatable.. which have 5 column... 3 of those column grab data from tbl_B.. so user will only need to fill in last 2 column..
for example.. when a form is submitted with prod_id 13.. grid will fill in column 1 with the new id, column 2 with the date and column 3 with the prod_code... so we will hv 3 column fill in automatically.. user then will only need to fill in the last 2 column..
row1: id>13 [tbl_A] date>8 apr [tbl_A] prod_code>Nz112 [tbl_B] amount>[~fill in by user~] unit price>[~fill in by user~]
row1: id>13 [tbl_A] date>8 apr [tbl_A] prod_code>Nz145 [tbl_B] amount>[~fill in by user~] unit price>[~fill in by user~]
row1: id>13 [tbl_A] date>8 apr [tbl_A] prod_code>Nb412 [tbl_B] amount>[~fill in by user~] unit price>[~fill in by user~]
row1: id>13 [tbl_A] date>8 apr [tbl_A] prod_code>Az133 [tbl_B] amount>[~fill in by user~] unit price>[~fill in by user~]
and so on...
anyone..?? tony??
14:04

Moderators
30/10/2007

Hello,
I'm not sure that I understand.
What you mean with
jqgrd will grab new product id from a form which will be submitted to grid
I think that where you grab the product id you should fill automatically the fields that should not be filled from the user.
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
11:56

14/01/2010

well .. i dunno how to simplify this.. the condition is... I have a form to keyin basic info ..
let say about claim: userid .. projectid .. + purpose (this part is not that important though hehe.. )
this form will generate an id .. to be pass to another form.. which is detail information on the claim which include let say
1. item 2. date 3. amount 4. amount budget 5. amount used..
I managed to solve the first problem andused autocomplete..
so now when I select an item [1. item] .. (through autocomplete)
I WANT the field for '4. amount budget' and '5. amount used' to be automatically fill in from 2 or more tables.
do u hv any idea how to do this.. some hint or samples would be nice..
thnx
14:02

14/01/2010

to add some which are related to this..
I hv 2 table :
1. table A : i) Name ii)prod_id iii)amount
2.table B : i)prod_id ii)prod_name
so in my grid user will see i)name ii)prod_name iii)amount.. my prob is how to save them into the database.. because currently the colModel is under prod_name.. so how can I get back the prod_id from the prod_name to be save into table A. Or how can I just add another colModel for prod_id which will be hidden but its value will change dependable of prod_name selection..
heeeelllppppp..!!!
14:03

14/01/2010

to add some more query which are related to this..
I hv 2 table :
1. table A : i) Name ii)prod_id iii)amount
2.table B : i)prod_id ii)prod_name
so in my grid user will see i)name ii)prod_name iii)amount.. my prob is how to save them into the database.. because currently the colModel is under prod_name.. so how can I get back the prod_id from the prod_name to be save into table A. Or how can I just add another colModel for prod_id which will be hidden but its value will change dependable of prod_name selection..
heeeelllppppp..!!!
17:23

Moderators
30/10/2007

Create anoter column in colModel named prod_id and do not display it - hidden:true
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
51 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