关于jqgrid 行编辑 下拉框下拉框的问题

您好,刚刚更新了火狐浏览器38.0.1,现在出现jqgrid弹出框中的下拉框不能选择的现象._百度知道
您好,刚刚更新了火狐浏览器38.0.1,现在出现jqgrid弹出框中的下拉框不能选择的现象.
提问者采纳
您好,如有疑问!很高兴为您答疑。建议您开启web控制台。  这种情况有可能是因为浏览器升级后针对js属性的支持出现了变化,导致的兼容问题,看下输出信息中是否有有用的线索帮助您定位问题。  希望我的回答对您有所帮助,欢迎继续咨询我们  尊敬的用户
提问者评价
Firefox,最快最安全的上网体验
主营:互联网软件
其他类似问题
为您推荐:
火狐浏览器的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁【荐】jqGrid动态填充select下拉框的选项值
function gettypes(){//动态生成select内容var str="";$.ajax({type:"post",async:false,url:"checkpersontype",success:function(data){if (data != null) {
var jsonobj=eval(data);
var length=jsonobj.
for(var i=0;i<i++){
if(i!=length-1){
str+=jsonobj[i].personType+":"+jsonobj[i].personType+";";
str+=jsonobj[i].personType+":"+jsonobj[i].personT
//$.each(jsonobj, function(i){
//str+="personType:"+jsonobj[i].personType+";"
//$("" + jsonobj[i].personType+ "").appendTo(typeselect);
alert(str);}});
}注意要return以及async:false否则没有效果 在colModel:中设置edittype:'select',editoptions:{value:gettypes()}就ok了0 顶0 踩分享到:
------分隔线----------------------------
------分隔线----------------------------
你可能对下面内容感兴趣:jqgrid&如何给下拉框(select)赋值,而这个值是从另一个表里查出来的。
先不多说看代码:
&colModel:[
&&&&&&&&&&{name:'userId',width:90,editable:true,edittype:'select',editrules:{required:true},editoptions:{value:getSelectNames("user")}},&&
比如说 有这样一个列 edittype是 select ,那他的数据是从 表里拿出来的 。这样
在getSelectNames("user")里写方法吧
getSelectNames(type){&&&
if(type=="user"){
&&&&&&&&&&&
$.ajax({url:"servlet/SampleSelecte?type=user",async:false,
success:function(e){&&&&&&&&&&&
&&&&&&&&&&&
if (e != null) {&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&
&&&&&&&&&&&
&&& return
一定要有 返回值。而且 你的返回值 是符合jqgrid 对select 值得规定的 字符串,而且 一定要用同步的ajax
操作。不然这样没任何效果
,也就是& async:false 这个属性
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。function gettypes(){
//动态生成select内容
var str="";
type:"post",
async:false,
url:"checkpersontype",
success:function(data){
if (data != null) {
&& & & &var jsonobj=eval(data);
&& & & &var length=jsonobj.
&& & & &for(var i=0;i&i++){
&& & & & & &if(i!=length-1){
&& & & & & & str+=jsonobj[i].personType+":"+jsonobj[i].personType+";";
&& & & & & &}else{
&& & & & & & & str+=jsonobj[i].personType+":"+jsonobj[i].personT// 这里是option里面的 value:label
&& & & & & &}
&& & & & } &&
&& & & & & & & &//$.each(jsonobj, function(i){
&& & & & & & & & //str+="personType:"+jsonobj[i].personType+";"
&& & && //$("&option value='" + jsonobj[i].personType + "'&" + jsonobj[i].personType+ "&/option&").appendTo(typeselect);
&& && & //});
&& & & & & &alert(str);
注意要return以及async:false否则没有效果
在colModel:中设置edittype:'select',editoptions:{value:gettypes()}就ok了
阅读(...) 评论()动态注入jqgrid下拉框选择项-土地公生活经验
动态注入jqgrid下拉框选择项
动态注入jqgrid下拉框选择项
colModel中设置属性,editable:true,editrules:{name:&#39;deptName&#39;,index:&#39;deptName&#39;, width:400,editable:true,edittype:"select", editrules:{required:true},editoptions:{size:71},align:&#39;center&#39;,sortable:false,search:true}, jqgrid中设置加载完成后 调用function。。。loadComplete: function() {//动态填充select值 $(list2).setColProp(&#39;deptName&#39;, { editoptions: { value: countries} }); }, 获取步骤2中的value值 var countries = ""; $.ajax({ url: &#39;../deptManage/getDeptSelect.action&#39;,//请求路径 async: false, success: function(data, result) { countries = data. if (!result) alert(&#39;部门名称加载失败...&#39;); }});data.countries 必须封装成这种格式:{"Countries":{230:UNITED STATES;40:CANADA;7:AFGHANISTAN;etc..... }}后台拼装语句:countries+=deptList.get(i).getDeptId()+":"+deptList.get(i).getName()+";";
“下拉动态”相关经验

我要回帖

更多关于 jqgrid 搜索 下拉框 的文章

 

随机推荐