title: How to set Default value in GridView Yii2
body: <p>I'm new in Yii2, and  i need a little bit help about GridView Yii2
  <a href="https://i.stack.imgur.com/xQy5m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xQy5m.png" alt="GridView Yii2"></a>
  </p>
  
  <p>I have tried to make a conditional like here :</p>
  
  <pre><code>   &lt;?=
  GridView::widget([
      'dataProvider' =&gt; $dataProvider,
      'filterModel' =&gt; $searchModel,
      'columns' =&gt; [
          ['class' =&gt; 'yii\grid\SerialColumn'],
           /*........Other attribute here..........*/
           [
              'attribute' =&gt; 'status_dosen',
              'value' =&gt; "status_dosen"==1 ? "Approved": "status_dosen"==NULL ? "Pending": "Rejected",
          ],
          [
              'attribute' =&gt; 'status_asrama',
              'value' =&gt; "status_dosen"==1 ? "Approved": "status_dosen"==NULL ? "Pending": "Rejected",
          ],
  
          ],
  ]);
  
  ?&gt;
  </code></pre>
  
  <p>But i Got error then : </p>
  
  <p><a href="https://i.stack.imgur.com/icwXl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/icwXl.png" alt="Error"></a>
  </p>
  
  <blockquote>
    <p>Unknown Property – yii\base\UnknownPropertyException
    Getting unknown property: backend\modules\aitk\models\AitkRequest::Rejected</p>
  </blockquote>
  
  <p>Anybody help me please..
  How do we can set a default value with some conditional value?</p>
  
  <p>For Attenttion and Help , I thank you.. :)</p>