Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7746373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:15:45+00:00 2026-06-01T10:15:45+00:00

How do i modify the links inside the CGridview? This is from my view

  • 0

How do i modify the links inside the CGridview?

This is from my view page:

$this->widget('zii.widgets.grid.CGridView', array(
'dataProvider'=>$new,
'columns'=>array(
'book.title',
'book.author',
'book.edition',
'date_borrowed',
'borrowed_status',
'date_returned',
'returned_status',
    array(
        'class'=>'Viewonly',
    ),
)
));

then from my Components:

class ViewOnly extends CButtonColumn {
    public $template = '{view}';
}

what i want to happen “FOR EXAMPLE” if i click the view button in my CGridview, it will redirect me to http://www.google.com?action=someaction. how can i do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T10:15:46+00:00Added an answer on June 1, 2026 at 10:15 am

    You don’t need a separate button class. Do something like this:

    array(
       'class'=>'CButtonColumn',
       'template'=>'{view} {google}',
       'viewButtonUrl=>'Yii::app()->createUrl("http://google.com/",array("q"=>$data->name))',
       'google'=>array(
          ... Init code for this button here
       ),
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to add simple links in kohana inside a view inside a loop
Rigth now, I am using this function to load content from a different page
How to modify this function so it could add target=_blank attribute to external links?
I'm trying to modify all links on a page so they perform some additional
Does anyone know how to modify the Wordpress canonical links to add a custom
modify hashes in an array {:sku=>TP-PA211, :desc=>description, :qty=>, :qty2=>1 en su sucursal, :price=>30.02 D}
I am trying to modify the amcap, an application from Windows SDK's example to
Whenever I want to modify a winform from another thread, I need to use
i have the following Ajax.actionlink inside a view to add an answer under a
From a July 2009 Technet article entitled Inside Windows 7 User Account Control ,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.