1
我有一個網格,它是基於從下拉框中選擇來填充的。
它工作正常,但我需要修改下拉爲多選,以允許用戶選擇多個條目。如何做呢?從多個選擇的下拉填充網格
HTML
<select name="prov_id" id="prov_id" multiple="multiple">
<option value="25_3″>agnico</option>
<option value="24_3″>agnico2</option>
</select>
SCRIPT
$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'
],
...