Yii Framework Forum: Email Anchor Links For Cgridview - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Email Anchor Links For Cgridview how to use email anchor link in CGrid view Rate Topic: -----

#1 User is offline   GkDreamz 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 19-July 12
  • Location:Coimbatore,TamilNadu,India.

Posted 16 November 2012 - 06:21 AM

 $this->widget('zii.widgets.grid.CGridView', array(
    'id'=>'inventory-stock-grid',
    'dataProvider'=>$dataProvider,
    'rowCssClass'=>array('gradeA odd','gradeA even'),
    'itemsCssClass'=>'datatable table table-striped table-bordered table-hover dataTable',
    'htmlOptions'=>array('class'=>''),
    'template'=>'{items}{pager}',
    'pager'=>'LinkPager',
    'pagerCssClass'=>'dataTables_paginate paging_bootstrap pagination',
    'columns'=>array(
        
    	array('name'=>'unique_id','value'=>'$data->unique_id'),
    		//array('name'=>'Name','value'=>'$data->first_name'),
    		
    		array('name'=>'Name',
    				'type'=>'raw',
    				'value'=>'CHtml::link($data->first_name,array("customers/view","id"=>$data->id))'),



i tried lot in this bug.. can anyone suggest me??

Thanks in Advance,
Ganesh Kumar.R
OpenSource Developer,
India.
0

#2 User is offline   yugene 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 488
  • Joined: 08-August 09
  • Location:World is Wide

Posted 16 November 2012 - 11:30 PM

Hi,

Not exactly sure what you mean by "email anchor link", but most probably 'email' type for a column should help - type, formatEmail()
Also, this wiki article may be useful
0

#3 User is offline   GkDreamz 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 19-July 12
  • Location:Coimbatore,TamilNadu,India.

Posted 17 November 2012 - 12:50 AM

View Postyugene, on 16 November 2012 - 11:30 PM, said:

Hi,

Not exactly sure what you mean by "email anchor link", but most probably 'email' type for a column should help - type, formatEmail()
Also, this wiki article may be useful


Thanks @yugene,i got it


array('name'=>'email_id','type'=>'email','value'=>'CHtml::mailto($data->email_id)'),

0

#4 User is offline   yugene 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 488
  • Joined: 08-August 09
  • Location:World is Wide

Posted 17 November 2012 - 01:18 AM

Well.. Not exactly.
Try shorter variant:
array('name'=>'email_id','type'=>'email','value'=>'$data->email_id'),

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users