title: Yii:Dynamic update ID for AJAX action on CGridView
body: <p>I'm using Yii 1.1 for implementing a master detail order-order-details grid
  So far I got his:
  <img src="https://i.stack.imgur.com/mwCow.jpg" alt="enter image description here">
  - basicaly when I click on the detail icon (left icon) - it loads with ajax the detail grid with the oder details (I used a component for this called EAjaxLinkColumn - by default a link column doesn't support ajax)</p>
  
  <p>Here's my code:</p>
  
  <pre><code>&lt;?php     $this-&gt;widget('zii.widgets.grid.CGridView', array(
          'id'=&gt;'main-orders-grid',
          'dataProvider'=&gt;$model-&gt;search(),
          'filter'=&gt;$model,
          'columns'=&gt;array(
  
      array (
      'class'=&gt;'EAjaxLinkColumn',
      'header'=&gt;'Details',
      'url'=&gt;Yii::app()-&gt;createUrl('mainOrdersDetails/detailview'),
      'imageUrl'=&gt;Yii::app()-&gt;request-&gt;baseUrl.'/images/zoom_in.png',
  
            //linkAjaxOptions and linkAjaxOptionsExpression are merged together, so only put the ones
            //that actually need to be evaluated in the latter
            'linkAjaxOptions' =&gt; array(
               'type' =&gt; 'POST',
               /*'dataType' =&gt; 'json',       */
               'update'=&gt;'#id_view',
            ),
            //In this expression, the variable $row the row number (zero-based); 
            //$data the data model for the row; and $this the column object.
            'linkAjaxOptionsExpression' =&gt; array(
               'data' =&gt; array(
                 'id' =&gt; '$data-&gt;id' //note that $data-&gt;id is an expression so must be quoted
               ),
            ),
  
      ),    
  
              'id',   
              'storageF.name',
              'date_added',
              'order_number',
              'expected_ship_date',
              'shipped_date',
              'shipping_costs',
              'personF.user',
              'date_to_pay',
              'paid_integraly',
              'paid_partialy',        
              array(
                  'class'=&gt;'CButtonColumn',
              ),
          ),
      )); ?&gt;
  </code></pre>
  
  <p>What I'd like is to load beneath each row it's detail. well I don't know how to do that..as CGridView widget is pretty wierd for a beginer like me in Yii
  Now it loads always into the same div .. note the </p>
  
  <p>'linkAjaxOptions' => array(
       'type' => 'POST',
       'update'=>'#id_view',
    ),</p>
  
  <p>First of all the update option is static.. I would like to use by ID #id_view_1 #id_view_2
  and then to somehow insert those empty rows beneath each master row</p>
  
  <p>Probably I could be using Jquery directly and not complicate with CGrid's options?</p>