. . .

Ajax button in CGridView

Published: October 4, 2010

To add an ajax button to CGridView modify the buttons column  as

 

'columns' => array(
    'id',
    'name',
    array(
        'class'=>'CButtonColumn',
        'template' => '{view} {update} {delete}',
        'buttons'=>array(
            'view' => array(
                'url'=>'"index.php?r=admin/view&id=".$data->user_id."&m=users"',
                     'click' => "function (){ $('#viewTab').load($(this).attr('href'));return false; }"
            )
        ),
    ),
)

 

Don't forget to share this post

    Let's Build Digital Excellence Together


    • Cost Efficient Solutions.
    • Minimal Timelines.
    • Effective Communication.
    • High Quality Standards.
    • Lifetime Support.
    • Transparent Execution.
    • 24/7 Availability.
    • Scalable Teams.

    Join Our 200+ Happy Clients Across Globe


    Free Consultation.

      Do you need help in strategy, innovation or growth of your startup/business? Experts from our team will get in touch with you.

      Please do not post jobs/internships inquiries here.