0

テキスト型のグリッドビュー列があります。

<sjg:gridColumn id="vName" name="variableName" index="variableName" title="Variable_Name" sortable="true" editable="true" edittype="text"/>

文字列「C:\」をダイナミック テキスト ボックスの内容に追加したいと考えています。どうすればいいのですか?このスクリプトを使用してみましたが、機能しません

var myString="C:\";
$('#vName').append(myString); 
4

1 に答える 1

0

カスタムフォーマット関数を簡単にセットアップできます:

列の colModel 内

   ....
   formatter: CustomFormatFunction, unformat: CustomUnFormatFunction},
   ....

カスタムフォーマット関数:

function CustomFormatFunction(cellval, opts, rowObject, action) {
   return "c:\" + cellval;
}

function CustomUnFormatFunction(cellval, opts, rowObject, action) {
   return cellval; //or manipulate the string to remove the "c:\"
}
于 2013-05-09T12:46:02.553 に答える