I am developing a web application using JSP & Servlet (IDE: Eclipse, Database: Oracle10). I am using jqGrid
to display records in tabular format.
code snippet:
{name:'CITY',index:'CITY', width:70,editable:true,edittype:"select",editoptions: {dataUrl: 'ProfileServ?action=comboCity', dataEvents: [{ type: 'change', fn: function(e) {alert(this.value);city= this.value;}}],}},
{name:'PIN',index:'PIN', width:200,sortable:false,editable:true, edittype:"select",editoptions: {dataUrl: 'ProfileServ?action=comboPin'}},
I want to change values of PIN
according to the value selected in CITY
. I have used dataEvents
and type: 'change'
to get the selected value of CITY
. I am successfully getting the selected value of CITY
.
My question is that how should I update the values of PIN
when value of CITY
is changed?