title: How can I show attribute value with check Box in Yii 2 GridView
body: <p>i like to put mission_id in checkbox</p>
  
  <pre><code>$req = 'select c.mission_id as mission_id, c.user_id as user_id from order c';
  
      $dataProvider = new SqlDataProvider([
              'sql' =&gt; $req,
      ]);
  
      return $this-&gt;render('factures', [
          'dataProvider' =&gt; $dataProvider,
      ]);
  </code></pre>
  
  <p>in _index.php </p>
  
  <pre><code>    &lt;?= GridView::widget([
      'dataProvider' =&gt; $dataProvider,
      'columns' =&gt; [
          'mission_id',
          'user_id',
  
      ],
  ]); ?&gt;
  </code></pre>
  
  <p>This it's ok, but when i use checkbox, it s KO : Trying to get property of non-object</p>
  
  <pre><code>[
              'attribute' =&gt; 'id',
              'format' =&gt; 'raw',
              'value' =&gt; function($data) {
                  return '&lt;input type="checkbox" name="chk_group" value="'.$data-&gt;mission_id.'" /&gt;Mission : '.$data-&gt;mission_id;
              },
          ],
  </code></pre>
  
  <p>Your help please</p>