Although there were several links regarding dynamic dropdown .after using those links i could not get expected result.I am able to get dynamic dropdown from php.But dont know how to pass parameter in editoption.Could any one suggest this.
how to get current row id .i want to pass it as id. in below shown:
Here is the code for jqgrid colmodel:
colModel:[{name:'proof',index:'proof', width:50,formoptions:{rowpos:4, colpos:2},editable:true,edittype:"select",
editoptions: { dataUrl:"http://27.251.54.45/lighthouse/dynamicversion.php?id=" +id}},]
php code:
include("include/connect.php");
$jobid=$_GET['id'];
$query = "SELECT r.revisionid FROM revision r JOIN revision v
ON r.versionid = v.versionid and r.jobid=$jobid";
echo "<select id='proof'>
<option value='New Version'>New Version</option>
<option value='New Revision'>New Revision</option>";
$result = mysql_query ($query,$connect);
while($cat=mysql_fetch_array($result)){
echo "<option value=$cat[0]>$cat[1]</option>";
}
echo "</select>";
?>
Could any one please give suggestion on this.Thanks