Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
Auto Insert Column data
Tags: auto fill
08/04/2010
04:59
Avatar
aznan
Member
Members
Forum Posts: 32
Member Since:
14/01/2010
sp_UserOfflineSmall Offline

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??

13/04/2010
14:04
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

14/04/2010
11:56
Avatar
aznan
Member
Members
Forum Posts: 32
Member Since:
14/01/2010
sp_UserOfflineSmall Offline

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/04/2010
14:02
Avatar
aznan
Member
Members
Forum Posts: 32
Member Since:
14/01/2010
sp_UserOfflineSmall Offline

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/04/2010
14:03
Avatar
aznan
Member
Members
Forum Posts: 32
Member Since:
14/01/2010
sp_UserOfflineSmall Offline

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..!!!

16/04/2010
17:23
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

19/04/2010
04:15
Avatar
aznan
Member
Members
Forum Posts: 32
Member Since:
14/01/2010
sp_UserOfflineSmall Offline

tony .. can this prod id field be interactive.. meaning.. when i choose the prod_name through a multi select list (droop down menu).. the prod id field will also change to the correspondence value?? ..  + is is possible to create a link multi select list..???

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information