Link , But Textbox Instead Url

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)




        'htmlOptions'=>array('style' => 'text-align: center;','width'=>'40px'),


            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.

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.