php - jqGrid. How to change the list of dropdownlist based on a present value in a row in edit mode? -


I am using jqgrid to display data from a MySQL database to add or edit a del Which I display in jqgrid:

  {name: 'proj_id', index: 'proj_id', width: 30, editable: correct, edittype: "select", editing options : {DataUrl: 'ddl / ddl_projet.php',} // end editing options},  

and my query ddl_projet.php:

  (" ../dbconfig.php "); $ Sql ​​= "select" to t_projet WHERE proj_id IN (4,5 9, 21, 22, 23, 24) ORDER BY proj_projet ASC "; echo & lt; select & gt; '$ result = $ dbh- & gt; Ready ($ SQL); $ Result-> Executed (); while ($ line = $ result-> Fetch ()) {echo '& lt; option value =' '. $ Line ['proj_id']. "& Gt; '. $ Line [' proj_projet '].'   

I had to limit the number of my DDLs in the list because I now have to limit them to all those L & I used to do this in my query: WHERE proj_id IN (4,5,9,21,22,23,24)

But when I wanted to edit the row with a value DDL, which was previously existed, in this version, the form I am definitely not showing this value is the basis of the values ​​of editing How can I change the content of DDL?

I guess you can manually activate To manage the status of these projects, it will be better for a new area in the table (or there will be no other way of separating the project status) You can do group projects based on your situation. And then the color accordingly Publishing can.

can sample

Help

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -