This is a migrated thread and some comments may be shown as answers.

RadGrid CommandItemTemplate button event (client side)

1 Answer 196 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Developer
Top achievements
Rank 1
Developer asked on 23 Dec 2014, 09:53 AM
Hi,
 
I have radbutton that sits within a radgrid command item
template.  I’d like to somehow have some JavaScript
that gets invokes whenever a user clicks this button.

The JavaScript itself should convey to the user the checked
status of the button (radtogglestate)

Any pointers greatly appreciated.

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 26 Dec 2014, 08:44 AM
Hello,

You can use the following client-side event handler:
<telerik:RadButton ... OnClientClicked="buttonClick">
JavaScript:
function buttonClick(sender, args) {
    var text = sender.get_selectedToggleState().get_text();
    alert(text);
}

Hope this helps. Please give it a try and let me know if it works for you.

Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Developer
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or