1
私はpdfのgridviewを印刷しています。グリッドビューは問題ありません。しかし、細胞は正しく充填されていません。私は少しフォントを減らすことができると思う、セルが適切に入力されます。私は幅を減らしました。しかし、細胞は歪んでいる。 GridViewののyii2でGridviewのフォントサイズを指定
コード -
<?= GridView::widget([
'dataProvider' => $dataProvider1,
//'filterModel' => $searchModel,
'layout'=>"{items}",
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'hsncode',
[
'label' => 'Productname',
'attribute' =>'productname',
'headerOptions' => ['style' => 'width:20%'],
//'contentOptions' => ['class' => 'col-lg-1'],
//'format'=>['decimal',2]
],
'batchno',
//'expdate',
[
'attribute'=>'expdate',
'format'=>['DateTime','php:m-y'],
'headerOptions' => ['style' => 'width:6%'],
],
'mrp',
'rate',
'qty',
'free',
'discount',
[
'label' => 'Value',
'attribute' =>'value',
//'contentOptions' => ['class' => 'col-lg-1'],
'format'=>['decimal',2]
],
[
'label' => 'GST%',
'attribute' =>'gstpercent',
//'headerOptions' => ['style' => 'width:6%'],
//'contentOptions' => ['class' => 'col-lg-1'],
'format'=>['decimal',0]
],
[
'label' => 'Total',
'attribute' =>'totalamount',
'headerOptions' => ['style' => 'width:9%'],
//'contentOptions' => ['class' => 'col-lg-1'],
'format'=>['decimal',2]
],
],
]); ?>
私はGridViewの中でフォントを指定する方法を教えてください。
で
または直接のオプションを使用することができます。どうもありがとう。 – Tanmay