我使用devexpress调度程序。以我的形式使用
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
use kartik\grid\GridView;
/* @var $this yii\web\View */
/* @var $model backend\models\Triwulan */
$this->title = $model->rm_code;
$this->params['breadcrumbs'][] = ['label' => 'Triwulans', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="triwulan-view">
<h1><?= Html::encode($this->title) ?></h1>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'rm_code',
'deskripsi_barang',
],
]) ?>
</div>
<?= GridView::widget([
'dataProvider'=>new yii\data\ActiveDataProvider([
'pagination'=>false,
'query'=>$model->getPenerimaans(),
]),
'columns'=>[
['class' => 'kartik\grid\SerialColumn'],
'rm_code',
'bulan',
// 'price',
[
'label' => 'Price',
//'attribute' => 'idDhs.idMatakuliah.jam',
'pageSummary' => true,
// 'pageSummary' => 'Total',
'value' => function ($model) {
if ($model)
return $model->price / 3;
}
],
// ['class' => 'kartik\grid\ActionColumn'],
// 'product',
// 'qty'
],
'showPageSummary' => true,
]) ?>
</div>
正如您可以看到iam使用工作周视图,开始周设置属性是星期一,但标题显示 schedulerControl1.ActiveViewType = DevExpress.XtraScheduler.SchedulerViewType.WorkWeek;
schedulerControl1.WorkWeekView.WorkTime.Start = System.TimeSpan.FromHours(7);
schedulerControl1.WorkWeekView.WorkTime.End = System.TimeSpan.FromHours(22);
schedulerControl1.WorkWeekView.ShowWorkTimeOnly = true;
schedulerControl1.WorkWeekView.ShowAllDayArea = false;
,依此类推。问题是如何将调度程序头更改为日期名称,如10 october, 11 october
等。
n.b:如果重复,请参考
答案 0 :(得分:1)
您可以为此目的使用格式化服务(请参阅Formatting Services - an example of use)。
参见: Work Week View without specific dates
请参阅以下替代方法来实现此目的:
How to: Display Custom Day Headers
SchedulerControl.CustomDrawDayOfWeekHeader Event
How to: Custom Paint Day Headers
CustomDrawDayHeader, how to use custom captions with default background ?
希望得到这个帮助。