Jqgrid允许使用特殊字符

时间:2017-04-22 04:53:59

标签: jquery jqgrid

jqgrid是否允许使用特殊字符? 在jqGrid中,我有地址和日期列

var strFieldNames = new Array('empid', 'Emp Address', 'DOB', 'DOJ', '');
var strFieldValues = new Array('empid', 'empaddress', 'dob', 'doj', 'detailedSequenceNum', 'dynaSeqNum');

selectedDynaListNum=0,
$(function() { 
    var lastsel;
$("#grid0").jqGrid({
 datatype: "jsonstring",
 datastr:GetJSON1(),

colNames:[strFieldNames[0], strFieldNames[1], strFieldNames[2], strFieldNames[3], strFieldNames[4], strFieldNames[5]],

colModel:[ 
    {name:'empid', index:'empid', width: 50, editable:true, editoptions:{readonly:false, size:5}, hidden:true,sortable:false},

    {name:strFieldValues[1], index:strFieldValues[1], editable:false, readonly:true, width:80,
            hidden:false,sortable:false}, 



    {name:strFieldValues[2], index:strFieldValues[2], editable:false, readonly:true, width:80,
                hidden:false,sortable:false},  

    {name:strFieldValues[3], index:strFieldValues[3], editable:false, readonly:true, width:80,
            hidden:false,sortable:false}, 

    {name:strFieldValues[4], index:strFieldValues[4], editable:false, readonly:true, width:80,
                hidden:false,sortable:false},  


    {name:'delImg', index:'delImg', width: '100%', editable:false, hidden:false, sortable:false, search: false,  formatter: setReadOnlyImageCustom},
    ],


    postData: {},
    height: "100%",
    shrinkToFit: true,
    autowidth: false,
    rownumbers: false,
    pager: '#pager0',
    sortname: 'id',
    viewrecords: true,
    sortorder: "asc",
    emptyrecords: "Empty records",
    loadonce: true,
    sortable: true,

rowList: [6,10,20,40,60,80,100],

    loadComplete: function() {
         var grid0 = jQuery("#grid0");
         var allDropDownElements = getAllDropDownElements0(); 
        var allDropDownElementRefTables = getAllDropDownElementRefTables0();
         processLoadComplete(grid0, allDropDownElements, allDropDownElementRefTables, 0);
         $('#pager0_center').show();
         },

    jsonReader:{root:"rows", page: "page", total: "total", records: "records", repeatitems: false, cell: "", id: "id"},

    onSelectRow: function(id) {
        },

    onCellSelect: function(rowid) {
         },

    onPaging: function (pgButton) {
         var grid0 = $("#grid0");
         processPaging(grid0, pgButton, 0);
        },

    onSortCol:function(id) {

            resetMainGrid(0);

        },

    gridComplete:function() {
         var grid0 = $("#grid0");
         var pager0Center = $("#pager0_center");
         processGridComplete(grid0, pager0Center, 0);
         onLoadpopulateName();
         },

    caption:""
    });


    $("#grid0").jqGrid('navGrid','#pager0', {edit:false, add:false, del:false, search:false, refresh: false},{}, {}, {}, {} );

});





selectedDynaListNum = -1;


function setReadOnlyImageCustom(cellval, options, rowdata) {
    var gridId = this.id;
    var subStr = gridId.substring(4,gridId.length);

    selectedDynaListNum = subStr;
    listNum = subStr;
    var formatted_cellval = '';

    dynaCountArray[listNum]++;
    formatted_cellval = dynaIconList[options.rowId-1];
    return formatted_cellval;
}

第一列是字符串,允许使用特殊的字符,例如 - /&等等 当我在地址中输入“/”时,它会在网格上显示时转换为“ - ”。 例如。 “A-block / Mindspace”在网格上显示为“A-block-Mindspace”

我希望在不转换的情况下显示文字 jqgrid在网格上显示特殊字符吗?

0 个答案:

没有答案