title: Create a custom column with custom buttons?
body: <p>Q : how to create a custom column with custom buttons?</p>
  
  <p>I want to create a grid view with cgridview as follow. How can I do?</p>
  
  <blockquote>
    <p>Company Name  | header 1.1 | header 1.2 | header 2.1 | header 2.2 |
    header 3.1 | header 3.2</p>
    
    <p>AAAA1         | [button]   | [button]   | [button]   | [button]   |
    [button]   | [button]   </p>
    
    <p>BBBB1         | [button]   | [button]   | [button]   | [button]   |
    [button]   | [button]  </p>
    
    <p>CCCC1         | [button]   | [button]   | [button]   | [button]   |
    [button]   | [button]</p>
  </blockquote>
  
  <p>==================================================================================
  update </p>
  
  <p>This is my cgridview code</p>
  
  <pre><code>&lt;?php $this-&gt;widget('zii.widgets.grid.CGridView', array(
      'id'=&gt;'customer-grid',
      'dataProvider'=&gt;$model-&gt;search(),
      'filter'=&gt;$model,
      'columns'=&gt;array(
          'customer_name',
          array(
              'class'=&gt;'CButtonColumn',
              'template'=&gt;'{select1} {select2} {select3} {select4} {select5} {select6} {select7} {select8}',
              'buttons'=&gt;array
              (
                  'select1' =&gt; array
                  (
                      'label'=&gt;'Send an e-mail to this user',
                      'url'=&gt;'Yii::app()-&gt;createUrl("job/getjobno", array("c_code"=&gt;$data-&gt;c_code))',
                      'imageUrl'=&gt;Yii::app()-&gt;request-&gt;baseUrl.'/protected/assets/images/gridview/icon_select.gif',
                      'options'=&gt;array('style'=&gt;'width:10px; border:none'),
                      'click'=&gt;'function(event) { 
                          $.ajax({
                              url:$(this).attr("href"),
                              dataType: \'json\',
                              success: function(data){
                                  //alert(data.newjobno);
  
                                  $("#Job_name").val(data.newjobno); 
                                  //console.log(\'target tr: \' + target);
                                  //$(target).find(\'.item-price\').val(data.newjobno);
                                  $("#customerlist").dialog("close");
                              }
                          });                     
                          event.preventDefault();
                      }',
                  ),      
              ),
          ),
          array(
              'type'=&gt;'raw',
              'value'=&gt;'$data-&gt;c_code',
              //'filter'=&gt;array('style'=&gt;'visible:none'), 
              'headerHtmlOptions'=&gt;array('style'=&gt;'width:0px; display:none; border:none; textdecoration:none'),
              'htmlOptions'=&gt;array('style'=&gt;'display:none; border:none;', 'class'=&gt;'customer-id'),  
              'header'=&gt;false,
              'filter'=&gt;false,
          ),
      ),
  )); ?&gt;
  </code></pre>