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

Get Rad Toolbar Button Attribute Client Side

1 Answer 92 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Tracy
Top achievements
Rank 1
Tracy asked on 20 Oct 2014, 10:20 PM
Hi,

I have added an attribute to a rad button on a rad toolbar.     
     rtbButton.Attributes.Add("ObjectId", dr("ObjectId").ToString)

I am trying to get the value of this client side on the OnClientButtonClicked event of the toolbar using the following code
var objectId = args.get_item().get_attributes().getAttribute('ObjectId');
alert(objectId);
but the objectId keeps returning undefined.

How can I get a reference to the attribute of the button client side.

Thank You
Tracy

1 Answer, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 23 Oct 2014, 10:21 AM
Hello Tracy,

I am sending you a sample project which shows how attributes are added.

Regards,
Peter Filipov
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
ToolBar
Asked by
Tracy
Top achievements
Rank 1
Answers by
Peter Filipov
Telerik team
Share this question
or