I saw below code in this Using CButtonColumn to customize buttons in CGridView documentation link
'buttonID' => array
(
'label'=>'...', //Text label of the button.
'url'=>'...', //A PHP expression for generating the URL of the button.
'imageUrl'=>'...', //Image URL of the button.
'options'=>array(), //HTML options for the button tag.
'click'=>'...', //A JS function to be invoked when the button is clicked.
'visible'=>'...', //A PHP expression for determining whether the button is visible.
)
Can’t we use “id” or “class” attribute to access this customized button in jQuery?
The buttonID is set as the class of the link but note that this button is repeated for every row… so depending on the selector you could get all the buttons on the page (from all rows)…
Can you explain better your need… from where (on what action) you need this button…
I am considering about undelete button. Though I put 'class’=>‘undelete dialog-link’, catch all click actions of undelete button using jQuery function I can’t see it (class=“undelete dialog-link”) appearing in my web page source.
I know I can use
'click'=>'function(){alert("Going down!");}',
to return undelete button click events to JavaScript function, I like to have separate jQuery code to access objects in web page for consistency.