标签: jqgrid

JQGrid,根据条件更改行背景颜色

我有以下jqgrid使用导入到我的母版页的jquery ui主题.

  $("#shippingscheduletable").jqGrid({
            url: $("#shippingscheduleurl").attr('href'),
            datatype: 'json',
            mtype: 'GET',
            altRows: true,
            colNames: ['Dealer', 'Model', 'Invoice', 'Date', 'PO', 'Serial', 'Status', 'City', 'State', 'IsPaid', 'Promo', 'Carrier', 'Int Notes', 'Ord Notes', 'Terms'],
            colModel: [
     { name: 'Company', index: 'id', width: 125, align: 'left' },
     { name: 'Model', index: 'Model', width: 50, align: 'left' },
     { name: 'Invoice', index: 'Invoice', width: 50, align: 'left' },
     { name: 'Date', index: 'OrderDate', width: 60, align: 'left' },
     { name: 'Po', index: 'PONum', width: 75, align: 'left' …
Run Code Online (Sandbox Code Playgroud)

asp.net-mvc jquery jqgrid

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

JQGrid是免费的吗?

http://www.trirand.com/blog/下载JQGrid js文件.它是免费的吗?

这是什么http://www.trirand.net/demoaspnetmvc.aspx?.我看到价格和许可证.

请有人澄清一下.

javascript jquery jqgrid jqgrid-asp.net

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

ASP.NET MVC 2.0在jqgrid中搜索的实现

嗨我正在尝试使用MVC 2 IN .NET(VS 2008)在jqgrid中使用单列搜索这是我到目前为止的代码,但我需要一个示例来匹配它或者我缺少的一个提示

jQuery("#list").jqGrid({
    url: '/Home/DynamicGridData/',
    datatype: 'json',
    mtype: 'POST',
    search: true,
    filters: {
        "groupOp":"AND",
        "rules": [
            {"field":"Message","op":"eq","data":"True"}
        ]
    },
    multipleSearch: false,
    colNames: [ 'column1', 'column2'],
    colModel: [
        { name: 'column1', index: 'column1', sortable: true, search: true,
          sorttype: 'text', autoFit: true,stype:'text',
          searchoptions: { sopt: ['eq', 'ne', 'cn']} },
        { name: 'column2', index: 'column2', sortable: true,search: false,
          sorttype: 'text', align: 'left', autoFit: true}],
    pager: jQuery('#pager'),
    rowNum: 10,
    rowList: [10, 60, 100],
    scroll: true,
    sortname: 'column2',
    sortorder: 'asc',
    gridview: true, …
Run Code Online (Sandbox Code Playgroud)

search linq-to-entities entity-framework jqgrid asp.net-mvc-2

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

Jquery JQGrid - 如何设置网格标题单元格的对齐方式?

是否可以在jqgrid中对齐网格列标题?例如对齐左右还是中心?

在jqrid文档http://www.trirand.com/jqgridwiki/doku.php?id=wiki:colmodel_options中说:

align: Defines the alignment of the cell in the Body layer, not in header cell. 
Possible values: left, center, right.
Run Code Online (Sandbox Code Playgroud)

请注意,它表示"不在标题单元格中".如何为标题单元格(网格标题单元格)执行此操作?文档没有提到这个小细节....

jquery jqgrid

24
推荐指数
2
解决办法
6万
查看次数

jqGrid GridUnload/GridDestroy

当我使用$('#mygrid').jqGrid('GridUnload');我的网格被销毁:没有寻呼机/没有标头.

在维基中我发现:

与先前方法的唯一区别是网格被破坏,但是表元素和寻呼机(如果有的话)可以再次使用.

我找不到GridUnload/GridDestroy之间的任何区别或者我做错了什么?

我使用jqGrid 3.8.

javascript jqgrid

24
推荐指数
2
解决办法
6万
查看次数

如何为某些列禁用jqGrid的搜索工具栏?

我已将搜索工具栏添加到我的jqGrid中,并且想知道是否有搜索某些列而不是所有列?

默认情况下,搜索工具栏会显示每列的搜索字段.

jquery jqgrid

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

如果没有数据返回,我怎样才能完全隐藏jqgrid?

当我从我的webservice返回记录时,我正试图只显示我的jqGrid.我不希望它被折叠到你只看到标题栏的地方,但如果这是我能做的最好的,我想我可以在标题中加入一条有意义的信息.不过,我更愿意隐藏网格并显示"找不到记录"消息div块.

我也猜测,如果最坏的情况发生,我可以在这个问题上做解决方案如何在jqGrid中显示没有任何数据的信息?(链接包括作为其他人的替代可能解决方案).

我已经尝试在从函数和GRIDCOMPLETE事件加载数据时使用的函数内部执行.hide(),并且都没有完成隐藏网格.我是JQuery的新手,更不用说使用jqGrid了.

$(document).ready(function() {
    $("#list").jqGrid({
        url: 'Service/JQGridTest.asmx/AssetSearchXml',
        datatype: 'xml',
        mtype: 'GET',
        colNames: ['Inv No', 'Date', 'Amount'],
        colModel: [
            { name: 'invid', index: 'invid', width: 55 },
            { name: 'invdate', index: 'invdate', width: 90 },
            { name: 'amount', index: 'amount', width: 80, align: 'right' }],
        pager: jQuery('#pager'),
        postData: { "testvar": "whatever" },
        rowNum: 10,
        rowList: [10, 20, 30],
        sortname: 'id',
        sortorder: "desc",
        viewrecords: true,
        imgpath: 'themes/sand/images',
        caption: 'My first grid',
        gridComplete: function() {
            var recs = $("#list").getGridParam("records");
            if …
Run Code Online (Sandbox Code Playgroud)

javascript jquery plugins jqgrid

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

jqGrid刷新本地数据(JSON对象)

我正在尝试将jqGrid与本地数据一起使用,我发现了一些问题:

我正在初始化这样的事情:

function refreshGrid($grid, results)
{
    $grid.jqGrid({
  data: results,
        datatype: "local",
        colNames:['#','File', 'Category', 'Line Number', 'Message Text','Detailed'],
        colModel:[
            {name:'count',index:'count', width:100, resizable: true},
            {name:'basename',index:'basename', width:100, resizable: true, classes:['basename']},
            {name:'category',index:'category', width:60, resizable: true},
            {name:'linenumber',index:'linenumber', width:60, resizable: true},
            {name:'text',index:'text',width:400, resizable: true},
            {name:'detailed',index:'detailed',width:100,classes:['detailed'], resizable: true }
            ],
        viewrecords: true,
     rowNum:100,
     rowList:[100,200],
     pager: '#debug_errors_pager',
     caption:"JSON Example"
 });
}
Run Code Online (Sandbox Code Playgroud)

我传入的数据results是一个对象数组.

问题:

1)寻呼机完全关闭.它显示正确的计数,但它实际上不允许我翻阅数据.

2)我无法刷新数据.我正在使用自己的搜索功能来达到我的目标results.我无法弄清楚如何更新现有数据.网格第一次初始化.在后续尝试中,它初始化为空表.

3)我尝试过这样的事情:

$grid.empty() - 因为$ grid对象由jqgrid修饰,所以不起作用.我试图"核"旧网格,然后简单地重新渲染它作为一种解决方法.`$ grid.trigger('reloadGrid') - 不起作用,不知道为什么.

注意:这是使用jQGrid 3.7.

jquery jqgrid

23
推荐指数
5
解决办法
6万
查看次数

使用JQuery创建链接的最佳方法?

我们使用jqGrid自定义格式化程序在JQuery网格中输出链接.我们只是使用String操作构建链接a:

var s = "<a title=\"Blah\" href=\"javascript:BlahFunc('" + options.rowId + "')\">This is blah<a>";
Run Code Online (Sandbox Code Playgroud)

有没有更"聪明"的方法来使用JQuery创建链接(和其他表单元素)?

jquery jqgrid

23
推荐指数
4
解决办法
8万
查看次数

如何让JQGrid识别服务器发送的错误?

我有一个功能非常好的jqgrid.

我想知道是否有可能捕获服务器发送的错误?它是如何完成的?

xml jquery jqgrid

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