作成日: 2019/09/17 最終更新日: 2019/09/17
文書種別
使用方法
詳細
ItemFormatterプロパティでイベントを実装し、セルのinnerHTML.replaceにて該当文字をスタイル付きの文字に置き換えることにより、一部の文字のみ色を変更することができます。
◎サンプルコード(View)
◎サンプルコード(View)
<script>
function ItemFormatter(panel,r,c,cell){
if (panel.cellType == 2 && panel.columns[c].header == "★テキスト") {
cell.innerHTML = cell.innerHTML.replace("★", "<span style='color:red;'>★</span>");
}
}
</script>
@(Html.C1().FlexGrid()
・・・
.ItemFormatter("ItemFormatter")
)
function ItemFormatter(panel,r,c,cell){
if (panel.cellType == 2 && panel.columns[c].header == "★テキスト") {
cell.innerHTML = cell.innerHTML.replace("★", "<span style='color:red;'>★</span>");
}
}
</script>
@(Html.C1().FlexGrid()
・・・
.ItemFormatter("ItemFormatter")
)
旧文書番号
84487