Forum


12:07

07/12/2010

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
13:46

07/12/2010

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
14:13

10/08/2009

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
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
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66