0

我正在将 jqgrid 与这样的列一起使用:

{label:'test',
name:'dn',
index:'dn_id',
sortable:false,
align:'center',
editable:false,
search:true,stype:'select',
searchoptions:{
    sopt: ['eq'],
    defaultValue:'1000',
    dataUrl:'<?php echo URL::base().'reports_dn/get_dns';?>'}
}

从 dataUrl 成功创建了选择下拉列表。但是如果用户选择搜索并按下提交按钮而不更改当前下拉选择,则会将空值发送到“dn_id”的服务器。但如果我更改下拉选择的值,它可以正常工作。这似乎是一个错误,但我不确定。请帮忙。谢谢

4

1 回答 1

0

i have this problem too! but i don't find any solution by search on web. i resolve this problem temporary by a trick i add one option with value = -1 and text "Please Select" then in change event i remove this option.

please see it

https://stackoverflow.com/a/17526140/2527458

it maybe help u

于 2013-07-08T12:14:10.037 回答