Forum


04:03

Moderators
30/10/2007

Hello,
Do not understand. Describe your problem again.
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.
06:49

I'll try to explain again in a little more detail as my previous response doenst actually cover everything.
I have a grid that is generated from a table that for example looks like this (simplified a lot):
id: Integer which is a foreign key
name: varchar
When I declare the grid, the id is not editable, I do not want it to be changed for any existing rows.
When the user wants to add a new row I need to do two things...
1) Id needs to be present in the edit form which it isnt, presumably as the field it not editable in the main grid
2) There might only be one id in the grid, but the user must be able to select from all of the id's in the foreign table, so I guess I need to do another lookup on the foreign table?
Im just not sure how to achieve this, I can't be the only person to have needed to do this so I am guessing it's possible but my lack of knowledge is the problem here.
08:52

2) There might only be one id in the grid, but the user must be able to select from all of the id's in the foreign table, so I guess I need to do another lookup on the foreign table
So I've found the docs on how to achieve point #2 but still struggling with #1
I have colModel set as:
name: 'resource_id',
index: 'resource_id',
hidden: true,
edithidden: true,
edittype: select,
editoptions: { value: "1:Resource1;2:Resource2" },
formoptions { editable: true}
10:47

outofsight said:
1) Id needs to be present in the edit form which it isnt, presumably as the field it not editable in the main grid
Sorted, my bad. editable: true in the wrong place
This has of course left me with a few more questions.
1) The wiki says an error message will be displayed when editrules are set and broken. Im just getting an exception thrown:
jQuery.jqgrid.edit is undefined
Do I need to put a callback in there somewhere?
2) Is it possible to use multiselect with inline editing in such a way that clicking the check box would not enable the input fields in the grid? I mean, only change to the input fields if the user clicks one of the other cells?
07:37

Moderators
30/10/2007

Hello,
Did you mean
jQuery.jgrid.edit or jQuery.jqgrid.edit - there is a difference
2. I think yes this is possible
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:05

tony said:
Hello,
Did you mean
jQuery.jgrid.edit or jQuery.jqgrid.edit – there is a difference
2. I think yes this is possible
Regards
Tony
Hi Tony,
Yes, the error was indeed jQuery.jgrid.edit is undefined, sorry for the typo.
Also, I worked around number 2. Basically by getting the selected rows and calling restoreRow on each of them before calling getRowData. If you know of a better way to handle this I am interested in it.
13:11

Moderators
30/10/2007

Hello,
"jQuery.jgrid.edit is undefined" mean that for some reasons the language file is not loaded.
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:
71 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