title: how select and get the row id of Cgridvew of yii
body: <p>I have been working on yii framework from last 10 days. I done a lot in my project but I stuck with one issue. in the following table when i click the any row it should get the data of selected row in jquery dialog and it should be opened when edit button on the table toolbar is clicked.
  <img src="https://i.stack.imgur.com/lwwkh.png" alt="enter image description here"></p>
  
  <p>as example when I user click the any row in the listed rows then it is to highlight and if edit button is clicked it should open the  dialog form with selected row data.
  here is my code.....</p>
  
  <pre><code>      &lt;table class="display" id="dt3"&gt;
          &lt;ul class="table-toolbar"&gt;
              &lt;li&gt;&lt;a href="#" id="create-user"&gt;&lt;img src="&lt;?php echo Yii::app()-&gt;request-&gt;baseUrl; ?&gt;/images/icons/basic/plus.png" alt="" /&gt; Add&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;&lt;img src="&lt;?php echo Yii::app()-&gt;request-&gt;baseUrl; ?&gt;/images/icons/basic/delete.png" alt="" /&gt; Delete&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#" id="create-user2"&gt;&lt;img src="&lt;?php echo Yii::app()-&gt;request-&gt;baseUrl; ?&gt;/images/icons/basic/edit.png" alt="" /&gt; Edit&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
            &lt;ul&gt;
        &lt;table class="display" id="dt4"&gt;
  
            &lt;tr&gt;
          &lt;?php
              $dataProvider=new CActiveDataProvider('Station');
              $this-&gt;widget('zii.widgets.grid.CGridView', array
             ( 
                      'dataProvider'=&gt;$dataProvider,
                      'itemsCssClass'=&gt;'display',
                      'summaryText'=&gt;'',                   
                      'rowCssClass'=&gt;array('odd gradeX','even gradeC'),
                      'htmlOptions'=&gt;array('class'=&gt;'display'),
                      'columns'=&gt;array(
  
                          array
                          (   
                              'name'=&gt;'Station Name',       
                              'value'=&gt;'$data-&gt;Station_Name',
                          ),
  
                           array
                          (   
                              'name'=&gt;'Status ',        
                              'value'=&gt;'$data-&gt;Status_value',
                          ),
  
                          array
                          (            
                              'name'=&gt;'Description ',
                              'value'=&gt;'$data-&gt;Station_Description',
                          ),
                          array
                          (            
                              'name'=&gt;'Order ID ',
                              'value'=&gt;'$data-&gt;OrderID',
                          ),
                          array
                          (            
                              'name'=&gt;'Updated By ',
                              'value'=&gt;'$data-&gt;Updated_by',
                          ),
                      ),
  
                  )
  
                      ); ?&gt;       
       &lt;/tr&gt;   
        &lt;/table&gt;
            &lt;/ul&gt;
          &lt;/table&gt;
  
  
  
  
    &lt;div id="dialog-form" title="Add/Edit Station" class="box-content" style="height: 100px"&gt;
         &lt;form action="index.php?r=setting/stations" method="POST"&gt;     
  
        &lt;div class="form-row"&gt;
          &lt;label class="form-label"&gt;Station Name&lt;/label&gt;
          &lt;div class="form-item"&gt;
            &lt;input type="text" name="station_name" /&gt;
           &lt;/div&gt;
        &lt;/div&gt;
  
        &lt;div class="form-row"&gt;
          &lt;label class="form-label"&gt;Description&lt;/label&gt;
          &lt;div class="form-item"&gt;
            &lt;input type="text" name="station_description"/&gt;
           &lt;/div&gt;
        &lt;/div&gt;
  
         &lt;div class="form-row"&gt;
          &lt;label class="form-label"&gt;Order Id&lt;/label&gt;
          &lt;div class="form-item"&gt;
            &lt;input type="text"name="order_Id" /&gt;
           &lt;/div&gt;
        &lt;/div&gt;
  
         &lt;div class="form-row"&gt;
          &lt;label class="form-label"&gt;Updated By&lt;/label&gt;
          &lt;div class="form-item"&gt;
            &lt;input type="text" name="updated_by" /&gt;
           &lt;/div&gt;
        &lt;/div&gt;
  
       &lt;ul style="float:right;"&gt;
           &lt;li style="float:right;"&gt;&lt;a href="#"&gt;&lt;input type="submit" class="button small green" value="Add  Station"&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
  
         &lt;/form&gt;
          &lt;/div&gt;
  </code></pre>