作成日: 2016/06/30 最終更新日: 2016/06/30
文書種別
制限事項
詳細
C1GridViewの仕様として、数値型のフィールドは右詰めで表示されます。
右詰め以外の配置で表示するには、下記のようなCSSもしくはスクリプトを設定してください。
右詰め以外の配置で表示するには、下記のようなCSSもしくはスクリプトを設定してください。
回避方法
◆全ての数値フィールドの配置を変更する場合
<style type="text/css">
td.wijdata-type-number {
text-align: center !important;
}
</style>
◆特定の数値フィールドの配置を変更する場合
<script type="text/javascript">
$(document).ready(function () {
$("#C1GridView1").c1gridview({
cellStyleFormatter: function (args) {
if (args.column.headerText == "UnitPrice") {
args.$cell.css("textAlign", "center");
}
}
});
});
</script>
<style type="text/css">
td.wijdata-type-number {
text-align: center !important;
}
</style>
◆特定の数値フィールドの配置を変更する場合
<script type="text/javascript">
$(document).ready(function () {
$("#C1GridView1").c1gridview({
cellStyleFormatter: function (args) {
if (args.column.headerText == "UnitPrice") {
args.$cell.css("textAlign", "center");
}
}
});
});
</script>
旧文書番号
81710