title: Listing only the particular data value in Tbgridview of yii
body: <p>I have an attribute, idC, which may contain any positive integer number. 
  So, If idC has values like 2,3, and so on such that 3 comes 4 times and 2 comes 2 times.
  Now, I want to list out data values with only idC=3 for one page 
  and idC=2 for another page and so on.
  But how to do this.</p>
  
  <p>Here is the listing code:</p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  $this-&gt;widget('bootstrap.widgets.TbGridView',array(
  'id'=&gt;'Subjects-grid',
      'dataProvider'=&gt;$model-&gt;search(),
      'type'=&gt;'striped bordered condensed',
      'template'=&gt;'{summary}{items}{pager}',
      'columns'=&gt;array(
          array('header'=&gt;'&lt;a&gt;S.N.&lt;/a&gt;',
              'value'=&gt;'$data-&gt;id_subjects',
              'htmlOptions'=&gt;array('width'=&gt;'70px'),
          ),
          'idC=$idC',
          array(
              'header'=&gt;'&lt;a&gt;Subject&lt;/a&gt;',
              'value'=&gt;'$data-&gt;subject',
          ),
          'staff_type',
         'sub_subject',
          array(
              'class'=&gt;'bootstrap.widgets.TbButtonColumn',
              'header'=&gt;'&lt;a&gt;Actions&lt;/a&gt;',
              'template' =&gt; '{view} {update}',
              'buttons' =&gt; array(
  
                  'view' =&gt; array(
                      'label'=&gt; 'View',
                      'options'=&gt;array(
                          'class'=&gt;'btn btn-small view'
                      )                ),
  
              'update' =&gt; array(
                  'label' =&gt; 'Update',
                  'options' =&gt; array(
                      'class' =&gt; 'btn btn-small update'
                  )
              ),
  
              ),
              'htmlOptions'=&gt;array('nowrap'=&gt;'nowrap'),
          )
      ),
  )); ?&gt;
  </code></pre>
  
  <p>and here's the view page.
  <img src="https://i.stack.imgur.com/k8d9K.png" alt="enter image description here"></p>