Yii Framework Forum: help!Save already check the box on the next page - Yii Framework Forum

Jump to content

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

help!Save already check the box on the next page Rate Topic: -----

#1 User is offline   frnak 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 14-May 10

Posted 28 June 2010 - 03:29 AM

In GridView add a CheckBox,to select a row, and then the next page to choose, but still able to return to previous display when you have selected the data line?Begin to use cookie to store the row data has been selected, but do not know how Click Next when the row has been selected saved data? ? ? Is there any way to ask you to solve this problem?
thanks!!!
/frank
0

#2 User is offline   frnak 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 14-May 10

Posted 28 June 2010 - 11:23 PM

none help me ?
i hope someone can help me!!
thanks very much!!!

/frank
0

#3 User is offline   fastcrash 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 245
  • Joined: 10-March 10
  • Location:South Jakarta

Posted 29 June 2010 - 01:11 AM

In GridView add a CheckBox,to select a row, and then the next page to choose,

i not quite understand what you intend to.. :mellow:

did you mean to select all rows with checkbox, like a tabular form ?

of course if you create cookie you must unset them.
if you just want to selected/marked a row after update or create, you can use cssClassExpression

'cssClassExpression'=>'$data->ID_News=='.$selected.' ? \'selected_row\' : \'\' ',


sory if not very helpful
0

#4 User is offline   frnak 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 14-May 10

Posted 02 July 2010 - 02:49 AM

first thanks for your reply! :rolleyes: fastcrash
i am very sorry,my english is poor. :unsure: my question is:
In GridView add a CheckBox row use to select a row, and then Jump the next page , but when back to previous page still able to display selected rows which you have selected the data line? Is there any way to solve this problem?
thanks!!!
code:
<?php $this->widget('zii.widgets.grid.CGridView', array(
			'dataProvider'=>$search->search(),			
			'summaryText'=>Yii::t('email','结果:{start}-{end} of {count}'),
			'selectableRows'=>2,			
			//'filter'=>$search,				
			'columns'=>array(				
				array(											
					'class'=>'myCheckBoxColumn',				
                                        'value'=>'$data->email_id',					
                                        'visible'=>(Yii::app()->user->getState("role")) == User::ADMIN,
                                        'checked'=>'',
				),
				'email_date',									
				'email_from',									
				'email_to',					
				'email_theme',				
				array(					
					'class'=>'CButtonColumn',						
					'header'=>Yii::t('email','附件'),										
					'template'=>'{accessor}',					
					'buttons'=>array('accessor'=>array(
						'label'=>Yii::t('email','accessor'),
						'url'=>'Yii::app()->createUrl("email/Accessor",array("id"=>$data->accessor_id))',
						'imageUrl'=>'images/accessory.jpg',
						'visible'=>'$data->accessor_id != ""',
					)),				
				),						
				array(			
					'class'=>'CButtonColumn',								
					'header'=>Yii::t('email','执行'),									
					'template'=>Yii::app()->user->getState("permission") == (User::ADMIN_PERMISSION)?'{down}&nbsp;&nbsp;&nbsp;{delete}':'{down}',	//判断'部门主管'权限
					'buttons'=>array('down'=>array(
						'label'=>Yii::t('email','down'),
						'url'=>'Yii::app()->createUrl("email/down",array("id"=>$data->email_id))',
						'imageUrl'=>'images/down.jpg',
					)),
				),		
			),
		)); ?>		

add a row :myCheckBoxColumn' use to select a row data!
help me!please........
thanks


/frank
0

#5 User is offline   frnak 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 14-May 10

Posted 06 July 2010 - 04:06 AM

none help me ? :unsure:
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