相关疑难解决方法(0)

将loadonce设置为true的jqgrid reloadGrid

我在一个页面中使用两个jqgrids.我使用的第二个网格,loadonce: true因为我需要在第二个网格中进行列排序.我需要在服务器回发后重新加载两个网格.(需要在第二个网格中显示更新的值).第一个网格重新加载很好,因为它不会使用该loadonce属性.我的问题是我们可以一起使用loadonce属性reloadGrid吗?(通过loadonce动态设置属性到网格)或者在这种情况下我是否需要进行服务器端排序?请指教.提前致谢.

jquery jqgrid

18
推荐指数
1
解决办法
4万
查看次数

jqGrid - 动态设置标题

caption在jqGrid定义中设置了参数.我想知道是否有办法根据classjqGrid插件所附加的表元素的属性动态设置它.

HTML 1

<table id="myjqgrid" class="view"></table>
<div id="Pager"></div>
Run Code Online (Sandbox Code Playgroud)

HTML 2

<table id="myjqgrid" class="edit"></table>
<div id="Pager"></div>
Run Code Online (Sandbox Code Playgroud)

JQGrid定义

$("#myjqgrid").jqGrid({
    caption: ""     // this is what I want to set dynamically
})
Run Code Online (Sandbox Code Playgroud)

jqgrid

8
推荐指数
1
解决办法
2万
查看次数

使用loadonce重新加载jqgrid:true

我是使用jqgrid的新手.

在新页面加载时,网格正在从数据库中正确加载数据.之后由于loadonce:true,网格没有从数据库重新加载数据以进行添加/编辑/删除.

我的应用程序组合是JSP,Servlet,MySQL

我有一个具有以下设置的网格

jQuery("#userList").jqGrid({
                    url: '<%=request.getContextPath()%>/userJqGrid?q=1&action=fetchData&userCookie=<%= encodedCookie%>',
                    datatype: 'xml',
                    mtype: 'GET',
                    colNames:['<%= userProp.getProperty(userColNames[0])%>',
                              '<%= userProp.getProperty(userColNames[1])%>',
                              '<%= userProp.getProperty(userColNames[2])%>',
                              '<%= userProp.getProperty(userColNames[3])%>',
                              '<%= userProp.getProperty(userColNames[4])%>',
                              '<%= userProp.getProperty(userColNames[5])%>'
],
                    colModel:[
                        {name:'<%= userColNames[0]%>',index:'<%= userColNames[0]%>',
                            width:120,sortable:true,editable:true,editrules:{required:true},formoptions:{rowpos:1, elmprefix:'*'}},
                        {name:'<%= userColNames[1]%>',index:'<%= userColNames[1]%>',
                            width:130,sortable:true,editable:true},
                        {name:'<%= userColNames[2]%>',index:'<%= userColNames[2]%>',
                            width:100,sortable:true,editable:true,editrules:{required:true},formoptions:{rowpos:3, elmprefix:'*'}},
                        {name:'<%= userColNames[3]%>',index:'<%= userColNames[3]%>',
                            width:180,sortable:true,editable:true,editrules:{email:true,required:true},formoptions:{rowpos:4, elmprefix:'*'}},
                        {name:'<%= userColNames[4]%>',index:'<%= userColNames[4]%>', 
                            width:100,sortable:true,editable:true},
                        {name:'<%= userColNames[5]%>',index:'<%= userColNames[5]%>', 
                            width:100,sortable:true,editable:true},
                    ],
                    pager: '#pager1',
                    rowNum:50,
                    height:'auto',
                    //rowList:[10,20,30],
                    loadonce: true,
                    sortname:'<%= userColNames[0]%>',
                    viewrecords: true,
                    editurl:'<%=request.getContextPath()%>/userJqGrid?q=1&action=addData&userCookie=<%= encodedCookie%>',
                    caption: 'User Grid',
                    ondblClickRow: function(rowid) {
                       $("#userList").jqGrid('editGridRow',rowid, userEditParam);
                        return;
                    }
                 });
$("#userList").jqGrid('navGrid',"#pager1",{add:true,edit:true,del:true});
$("#userList").jqGrid('gridResize', …
Run Code Online (Sandbox Code Playgroud)

jquery jqgrid

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

jqgrid ×3

jquery ×2