jqgrid多字段排序参数

var config = {
                title: '菜单列表',
                url: '@Url.Action("GetListWithPager")',
                mtype: 'post',
                sortname: 'Name,Type,Order',
                sortorder: 'DESC',
                multiSort: true,
                colNames: ['主键', '菜单名称', '类型', 'URL地址', '排序', '创建日期'],
                colModel: [
                    { name: 'Id', index: 'Id', width: 60, key: true, hidden: true, search: false, dataType: "text" },
                    { name: 'Name', index: 'Name', width: 60, search: true, dataType: "text", sortable: true },
                    {
                        name: 'Type',
                        index: 'Type',
                        width: 60,
                        search: true, sortable: true,
                        dataType: "int",
                        data: [{ key: 1, name: "模块" }, { key: 2, name: "菜单" }, { key: 3, name: "按钮" }],
                        formatter: function(cellValue, options, rowObject) {
                            return rowObject.TypeName;
                        }
                    },
                    { name: 'Url', index: 'Url', width: 60, search: true, dataType: "text", sortable: true },
                    { name: 'Order', index: 'Order', width: 60, search: false, dataType: "text", sortable: true },
                    {
                        name: 'CreateDateTime',
                        index: 'CreateDateTime',
                        width: 60,
                        search: true,
                        dataType: "date",
                        formatter: function (cellValue, options, rowObject) {
                            return cellValue.getDate();
                        }, sortable: true
                    }
                ]
            };

你可能感兴趣的:(JavaScript)