title: How I can process a checkbox column from Yii2 gridview?
body: <p>I need to insert rows into a table from a set of checkboxes in a gridview widget view.</p>
  
  <p>My _add.php code:</p>
  
  <pre><code>$itemsQuery = Inventory::find();
  $itemsQuery-&gt;andFilterWhere(['inv_status' =&gt; 1, 'inv_condition' =&gt; 2]);
  $dataProvider = new ActiveDataProvider([
                                         'query' =&gt; $itemsQuery,
                                         ]);
  echo GridView::widget([
      'id' =&gt; 'griditems',
      'dataProvider' =&gt; $dataProvider,
      'columns' =&gt; [
          ['attribute' =&gt; 'inv_group', 'value' =&gt; 'invGroup.inv_group'],
          ['attribute' =&gt; 'inv_class', 'value' =&gt; 'invClass.inv_class'],
          'brand',
          'model',
          'description',
          ['class' =&gt; 'yii\grid\CheckboxColumn'],
      ],
  ]);
  </code></pre>
  
  <p>I've tried using JavaScript, however I can't get results:</p>
  
  <pre><code>$('element').one('click',function() {
  var keys = $('#griditems').yiiGridView('getSelectedRows');
  $.post({
     url: 'picked-items/processselected', // your controller action
     dataType: 'json',
     data: {keylist: keys},
     success: function(data) {
        if (data.status === 'success') {
            alert('Total price is ' + data.total);
        }
     },
  });
  });
  </code></pre>
  
  <p>I've tried several possible solutions with no results, I've read documentations, blogs, forums and I can't do it.</p>
  
  <p>How can I process data into my controller from a set of checkboxes in a gridview table?</p>