mark2bra
(Mark2bra)
April 28, 2014, 4:24pm
1
Ok , another quick question:
In one of the cGridViews I have a column containing user comments. Now , the comments they write are quite long, so I’m thinking to turn that into a link , but instead of changing the url I want a textbox containing the message to pop on the screen.
Is it possible?
Here is the link column code I’m using (for now , I see the users message in the URL , lol)
array(
'type'=>'raw',
'header'=>'comment',
'htmlOptions'=>array('style' => 'text-align: center;','width'=>'40px'),
'value'=>function($data){
if ($data->comment == null)
return '';
return CHtml::link('comment', $data->comment, array('class'=>'link'));
},
),
jkofsky
(Jkofsky)
April 28, 2014, 7:55pm
2
Ok , another quick question:
In one of the cGridViews I have a column containing user comments. Now , the comments they write are quite long, so I’m thinking to turn that into a link , but instead of changing the url I want a textbox containing the message to pop on the screen.
Is it possible?
Here is the link column code I’m using (for now , I see the users message in the URL , lol)
array(
'type'=>'raw',
'header'=>'comment',
'htmlOptions'=>array('style' => 'text-align: center;','width'=>'40px'),
'value'=>function($data){
if ($data->comment == null)
return '';
return CHtml::link('comment', $data->comment, array('class'=>'link'));
},
),
Maybe not what you’re looking for, but… You could change the ‘value’=> statement to display on part of the comment, then use CButtonColumn::template = ‘[view]’ to link to the detail view that would show the whole comment.
mark2bra
(Mark2bra)
April 29, 2014, 9:23am
3
Maybe not what you’re looking for, but… You could change the ‘value’=> statement to display on part of the comment, then use CButtonColumn::template = ‘[view]’ to link to the detail view that would show the whole comment.
Yes , I have a similar thing , but it moves the user to a different window.
I want the comment to be presented in the same window of the gridView… . .
jkofsky
(Jkofsky)
April 30, 2014, 2:35am
4
Yes , I have a similar thing , but it moves the user to a different window.
I want the comment to be presented in the same window of the gridView… . .
CJuiDialog for a popup, or I’ve seen code for doing a [more…] link with show/hide using jquery and css. I’m just don’t remember how to do it.