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_TopicIcon
hOw to add extra fields to editRow form
26/10/2009
15:20
Avatar
outofsight
Guest
Guests

Hi,

Is it  possible/what is the best way to add some custom fields to the editRow dialog when adding a new row to the grid?

TIA

27/10/2009
04:03
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

27/10/2009
11:54
Avatar
outofsight
Guest
Guests

tony said:

Hello,

Do not understand. Describe your problem again.

Regards

Tony


I have some fields in a grid that are not editable, however, when the user adds a new row to the grid I need some of those non-editable fields to appear in the form.

TIA

28/10/2009
06:49
Avatar
outofsight
Guest
Guests

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.

28/10/2009
08:52
Avatar
outofsight
Guest
Guests

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}

28/10/2009
10:47
Avatar
outofsight
Guest
Guests

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 Embarassed

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?

30/10/2009
07:37
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

02/11/2009
11:05
Avatar
outofsight
Guest
Guests

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.

02/11/2009
13:11
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

Forum Timezone: Europe/Sofia

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

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

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information