title: creating alert buttons on click event for grid view in yii
body: <p>In My web application I am using grid view in index action  view. I need to create a  button called "book" which when clicks shows a dialog box  which displays the related content.
  I tried this code but its not reacting to the event.
  My code for index.php  grid view</p>
  
  <pre><code>&lt;h1&gt;Producer Offers&lt;/h1&gt;
  
  &lt;?php 
  $this-&gt;widget('bootstrap.widgets.TbGridView',array(
      'dataProvider'=&gt;$dataProvider,
          'columns'=&gt;array(
  
  
                  'offered_vegetable',
                  'offered_qty',
                  'unit_cost',
                  'unit_delivery_cost',
  
                  array(
                      'class'=&gt;"bootstrap.widgets.TbButtonColumn",
                          'deleteConfirmation'=&gt;"js:'Do you really want to delete record with Offer name '+$(this).parent().parent().children(':nth-child(2)').text()+'?'",
                      'template'=&gt;'{view}{book}{delete}',
                      'buttons' =&gt;array(
                              'book'=&gt;
                                 array(
                                 'label'=&gt;'book',
                                 'click' =&gt;"js:alert('do u want to book this offer!')" 
  
  
                  ),
          ),
                          ),
                  ),
  
          )); 
  ?&gt;
  </code></pre>
  
  <p>When the page is refreshed  it is displayed but I want to react to the event when the button is clicked, Anybody help me how to resolve this issue</p>