Forum


15:00

12/02/2010

Hi,
I want to hide/show the form field base on selection from select form field, I used the following code but it didn't hide the #Job_Name. How to acheive this?
index: '`Job #`',
editable: true,
edittype: 'text',
editoptions: { size: 10, readonly: 'readonly'},
editrules: {required: true },
formoptions: { label: 'Job #' },
width: 10,
formatter: 'integer',
formatoptions: { thousandsSeparator: '' },
searchoptions: { sopt: ['eq','ne','lt','le','gt','ge', 'in', 'ni'] },
align: 'right',
sortable: true
},
{ name: 'Job_Name',
index: '`Job Name`',
editable: true,
edittype: 'select',
editoptions: { //size: 1,
value:{1:'One',2:'Two'},
// dataUrl: 'select',
dataEvents: [
{ type: 'change',
fn: function(formid) {
$("tr_#Job_Number").hide();
}
}
]
},
formoptions: { label: 'Job Name' },
searchoptions: { sopt: ['eq','ne','lt','le','gt','ge', 'cn', 'nc', 'bw', 'bn'] },
align: 'right',
width: 150,
align: 'left',
sortable: true
}
Thanks in advance,
lupind
11:26

Moderators
30/10/2007

Hello,
try this
$("#tr_Job_Number").hide(); instead of
$("tr_#Job_Number").hide();
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.
12:26

12/02/2010

Hi Tony,
That do the trick, but I noticed since I'm following your excellent documents here http://www.secondpersonplural......tm(Dynamic Editing Form), if I put a it this way:
$("#tr_Job_Number",formid).hide(); as per that docs it won't work, did I misunderstood something?
again thank you very much for your fantastic project and support.
more power to you,
lupin
20:01

Moderators
30/10/2007

Hello,
You should note that this is for form edit, so in your case you - in any other module formid is not needed.
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.
Most Users Ever Online: 715
Currently Online:
72 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