Get Rad Toolbar Button Attribute Client Side

2 posts, 0 answers
  1. Tracy
    Tracy avatar
    118 posts
    Member since:
    Nov 2010

    Posted 20 Oct 2014 Link to this post

    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

  2. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 23 Oct 2014 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top