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
hide and columns
07/12/2010
12:07
Avatar
elie
Member
Members
Forum Posts: 9
Member Since:
07/12/2010
sp_UserOfflineSmall Offline

hi,

i want to ask if i can hide a column when editing and show it when adding a new record.

Acually i know that i can set for a column hidden:true and editrules:{edithidden:false}

but this column will be hidden when adding and when editing.

is there a way to change editrules to  editrules:{edithidden:true} when i click on "Add button"

Thanks in advance,

Elie

07/12/2010
13:12
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hi Elie,

I hope you find the answer on your question here or here in my old answers on the stackoverflow.com.

Best regards
Oleg 

07/12/2010
13:46
Avatar
elie
Member
Members
Forum Posts: 9
Member Since:
07/12/2010
sp_UserOfflineSmall Offline

hi again,

first thanks for the answer

second i have another question

if i have 

{name:'email',index:'email',editable:true,sortable:false, width:100,editrules:{required:true,email:true}},

is there a method,i can call to set editable:false or sortable:true

i read that i can change params of a grid ("setGridParam") can i do it for a column?

thanks for your time,

Elie

07/12/2010
14:13
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hi Elie,

in the answer from the second link which I posted you before I do almost the same thing which you asked me. The code like the following

var cm = grid.jqGrid('getColProp','email');
cm.editable = false;
cm.sortable = true;

will do this. You should only choose the place where you will do the changes in the colModel. For example if you want to have the changes before the Add dialog will displayed you can do the changes inside of beforeInitData event handler defined as a part of the prmAdd parameter of the navGrid. If needed you can reset the settings after the Add dialog will be closed. Choose the corresponding event handle to do this.

Best regards
Oleg 

07/12/2010
15:08
Avatar
elie
Member
Members
Forum Posts: 9
Member Since:
07/12/2010
sp_UserOfflineSmall Offline

Dear Oleg,

Thank you very much,these two links and the second post helped me a lot.

Once again thanks for your time.

Best Regards,

Elie

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
59 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