title: Yii gridview ajax custom button before send updating the cell value
body: <p>Am facing the problem of showing the loader.gif beforesend function via ajax in the yii gridview in a particular related cell value. here is my gridview.</p>
  
  <pre><code>&lt;?php $this-&gt;widget('zii.widgets.grid.CGridView', array(
  'id'=&gt;'deals-grid',
  'dataProvider'=&gt;$model-&gt;mersearch(),
  
  'columns'=&gt;array(
      'title',
      'description',
      array('header'=&gt;'Valid Till','name'=&gt;'valid','value'=&gt;$data-&gt;valid),
      array('name' =&gt; 'status',
                  'value'=&gt;array($this,'getStatus'),
                  'filter' =&gt; $active,'sortable'=&gt;TRUE,
                  'htmlOptions'=&gt;array('class'=&gt;'status'),
                  ),
      array
              (   
              'name'=&gt;'image',
                   'type'=&gt;'image',
                              'value'=&gt;array($this,'imagePath'),
                              'htmlOptions'=&gt;array('class'=&gt;'thumb','rel'=&gt;'gallery'),
              ),
   array(
  'class'=&gt;'CButtonColumn',
  'buttons'=&gt;array
  (
  
    'mail' =&gt; array
      (   
    'label'=&gt;'mail',
    'imageUrl'=&gt;Yii::app()-&gt;request-&gt;baseUrl.'/images/mail.png',
    'url'=&gt;'Yii::app()-&gt;createUrl("deals/sendmail", array("id"=&gt;$data-&gt;id))',
    'options' =&gt; array( 'ajax' =&gt; array('url'=&gt;'js:$(this).attr("href")',
  'beforeSend'=&gt;'function(){
   var obj= $(".mail");
    obj.parent().parent().find(".status").replaceWith("&lt;td class=\"status\"&gt;&lt;img src=\"/images/loading.gif\"&gt;&lt;/td&gt;");}',
                                                                  'success'=&gt;'function(data){$(".status").html("Mail Sent Successfully.")
                                                                      }',
                                      ),
                                                       'class'=&gt;'mail',
                                      )),                                 
  
          ),
           'template'=&gt;'{update}{delete}{mail}',
      ),
  ),
  )); ?&gt;
  </code></pre>
  
  <p>The main problem is that When i click on sendmail button it replace all the parent status class cell with loading.gif but i just want to replace only that row status cell replaced but not all.</p>