JqG​​rid分组抛出 - 未捕获的异常:jqGrid - 没有这样的方法:groupingSetup [英] JqGrid grouping throws - uncaught exception: jqGrid - No such method: groupingSetup

查看:99
本文介绍了JqG​​rid分组抛出 - 未捕获的异常:jqGrid - 没有这样的方法:groupingSetup的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我设置分组时:true它会抛出异常 - 未捕获异常:jqGrid - 没有这样的方法:groupingSetup。

嗨以下是我的代码对于JqGrid。我正在通过网址和触发按钮单击事件的重新加载。当我没有通过分组:真的,它工作正常。



请尽快帮助我。我有一个演示要显示。

提前致谢。

When I set grouping:true it throws exception - uncaught exception: jqGrid - No such method: groupingSetup.
Hi Below is my code for JqGrid. I am passing the url & triggering the reload on button click event. When I dont pass the grouping:true, it works fine.

Please Help me ASAP. I have a demo to show.
Thanks in advance.

$('#tblInputSources').jqGrid({
            //url: self.Resources.get('SystemServiceGridUrl'),
            datatype: 'json',
            colNames: [
                'InputTypeId',
                'InputTypeName',
                'ExternalInputId',
                'InputSourceName',
                'StoppedTime'
            ],
            colModel: [
                { name: 'InputTypeId', hidden: true, sortable: false, resizable: false },
                { name: 'InputTypeName', hidden: false, sortable: false, resizable: false },
                { name: 'ExternalInputId', hidden: true, sortable: false, resizable: false },
                { name: 'InputSourceName', hidden: false, sortable: false, resizable: false },
                { name: 'StoppedTime', hidden: false, sortable: false, resizable: false }
            ],
            mtype: 'GET',
            caption: 'This is title',
            rowNum: 100,
            hidegrid: false,
            autowidth: true,
            loadonce: false,
            viewrecords: true,
            loadui: 'block',
            width: 100,
            height: 420,
            //search: true,
            multiselect: true,
            //multiselectWidth: 28,
            loadtext: 'Add Localization...',
            sortname: 'InputTypeName',
            grouping: true,
            groupingView: {
                groupField: ['InputTypeName'],
                groupText: ['<input type="checkbox" class="groupHeader"/> <b>  {0}  </b>'],
                hideFirstGroupCol: true,
                groupCollapse: [false]
            }
        });

推荐答案

('#tblInputSources')。jqGrid({
// url:self.Resources.get('SystemServiceGridUrl'),
datatype 'json',
colNames:[
'InputTypeId',
'InputTypeName',
'InternalInputId',
'InputSourceName',
'StedpedTime'
],
colModel:[
{name:' InputTypeId',hidden:true,sortable:false,resizable:false}

{ name 'InputTypeName',hidden:false,sortable:false,resizable:false}
{名称 <温泉n class =code-keyword>: 'ExternalInputId',hidden:true,sortable:false,resizable:false}
{ name 'InputSourceName',hidden:false,sortable: false,resizable:false}
{ name StoppedTime,隐藏:false,sortable:false,resizable:false}
],
mtype 'GET',
标题:'这是标题',
rowNum:100,
hidegrid:false,
autowidth:true,
loadonce:false,
viewrecords:true,
loadui:'block',
width:100,
身高:420,
// search:true,
multiselect:true,
// multiselectWidth:28,
loadtext:'添加本地化...',
sortname:'InputTypeName',
分组:true,
groupingView:{
groupField:['InputTypeName'],
groupText:['< input type =checkboxclass =groupHeader/> < b取代; {0}
< / b>'],
hideFirstGroupCol: true
groupCollapse: [false]
}
});
('#tblInputSources').jqGrid({ //url: self.Resources.get('SystemServiceGridUrl'), datatype: 'json', colNames: [ 'InputTypeId', 'InputTypeName', 'ExternalInputId', 'InputSourceName', 'StoppedTime' ], colModel: [ { name: 'InputTypeId', hidden: true, sortable: false, resizable: false }, { name: 'InputTypeName', hidden: false, sortable: false, resizable: false }, { name: 'ExternalInputId', hidden: true, sortable: false, resizable: false }, { name: 'InputSourceName', hidden: false, sortable: false, resizable: false }, { name: 'StoppedTime', hidden: false, sortable: false, resizable: false } ], mtype: 'GET', caption: 'This is title', rowNum: 100, hidegrid: false, autowidth: true, loadonce: false, viewrecords: true, loadui: 'block', width: 100, height: 420, //search: true, multiselect: true, //multiselectWidth: 28, loadtext: 'Add Localization...', sortname: 'InputTypeName', grouping: true, groupingView: { groupField: ['InputTypeName'], groupText: ['<input type="checkbox" class="groupHeader"/> <b> {0} </b>'], hideFirstGroupCol: true, groupCollapse: [false] } });


可能是您的问题 - 结果是jqGrid保存了表标记的ID,然后使用该标记引用该表。给ID解决问题。



看到它可以帮助你
may your problem -- turns out jqGrid saves the ID of the table tag, and then references the table later using that tag. Giving the an ID fixed the problem.

See it may help you


Hurrayyyyyy.

I was missing to add the reference of **grid.grouping.js**


这篇关于JqG​​rid分组抛出 - 未捕获的异常:jqGrid - 没有这样的方法:groupingSetup的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆