Get parent element from RadNumericTextbox client side

2 posts, 0 answers
  1. AnneArents
    AnneArents avatar
    14 posts
    Member since:
    Jan 2010

    Posted 20 Jun 2013 Link to this post

    Hi,

    I have a number of RadNumericTextboxes that all link to the same ValueChanged clientside event.
    In this event I want to get the parent element of this RadNumericTextbox (a table cell) and change its background color.
    However I have trouble getting the parent element. The RadNumericTextbox doesn't support the regular javascript 'parentNode' property so I can't use that. And I also have trouble selecting the RadNumericTextbox as a 'regular' DOM element because it's in a page with a masterpage, so the ID is useless.

    Can anyone help?

    Cheers,
    CJ
  2. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 25 Jun 2013 Link to this post

    Hi,

    You can use the following method the get the element of the numeric box:
    var numBoxEl = sender.get_element();
    Then, you can use the same properties and methods as with the standard input elements.

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

    Regards,
    Eyup
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top