0

jqgridを使用して動的データを表示していますが、SQLストアドプロシージャは一部のデータを「T&E」として返します。このデータをグループヘッダーに表示しています。グループヘッダーに「T」しか表示されません。残りのデータはIE7/8でトリミングされています。Firefoxで実行した場合と同じように、「T&E」として正しく表示されます。この問題の解決策を教えてください。助けていただければ幸いです。

autoencodeプロパティをtrueに設定してみましたが、機能しませんでした。utf-8をエンコードするメタタグ文字をaspxファイルに保持しました。

4

1 に答える 1

1

編集中に同様の問題が発生しました。このリンクは、私がいくつかの調整を加えて、私が望んでいたことを達成するのに役立ちました。

私のシステム構成。

IE8で7を獲得

編集中に、「&」の後のテキストが失われました。例:「a&a」のようなテキストがあった場合、「a」のみがグリッドに表示され、最終的に保存されます。

カスタムフォーマッターは、これまで私のためにトリックを行いました。

//In col Model 
//Assuming description is one of your column in the jqGrid
//Note the formatter , this is the custom formatter which does the magic for us in this case.
{ name: 'Description', index: 'Description', align: "center", sorttype: 'text', sortable: true, resizable: false, editable: editGrids, formatter: formatTextDisplay,unformat:unformatTextDisplay}

//Formatter code
var formatTextDisplay = function (cellval, opts, action) {
            if (cellval) {
                return $.jgrid.htmlEncode(cellval);
            };
            return "";
        }

//Un formatter code, in case you want to read through the text in its original state from the grid for processing in the javascript file.
var unformatTextDisplay = function (cellval, opts, action) {
            if (cellval) {
                return $.jgrid.htmlDecode(cellval);
            };
            return "";
        }
于 2013-02-11T12:50:47.437 に答える