1

ドロップダウンボックスからの選択に基づいて入力されるグリッドがあります。
正常に動作しますが、ユーザーが複数のエントリを選択できるように、ドロップダウンを複数選択できるように変更する必要があります。どのようにそれを行うことができますか?

HTML

<select name="prov_id" id="prov_id" multiple="multiple">
  <option value="25_3″&gt;agnico</option>
  <option value="24_3″&gt;agnico2</option>
</select> 

脚本

$myGrid.jqGrid(
{
  url: myURL + '?method=GetTransactions', //CFC that will return the transactions
  postData: {
  prID: function() { return $("#prov_id option:selected").val(); },
  mn: function() { return $("#month option:selected").val(); },
  yr: function() { return $("#year option:selected").val(); }
},
//multiselect: true,  //adds checkboxes in front of each line
//multiboxonly: true,
datatype: 'json',     //We specify that datatype we will be using is JSON
colNames: [
  'Trx ID',
  'Description',
  'Cheque No',
  'Amount', 
  'Debit',
  'Credit', 
  'Month', 
  'Year', 
  'Status',
  'Added by Employee'
],
...
4

1 に答える 1

0

興味のある人がいれば、私はこの問題を解決しました:

function getSelProv(){
   return  $('select#prov_id').val();
}
.......
postData: { 
  prID: function() { return getSelProv() },
........
于 2012-10-05T15:29:50.340 に答える