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

Get parent element from RadNumericTextbox client side

1 Answer 226 Views
Input
This is a migrated thread and some comments may be shown as answers.
AnneArents
Top achievements
Rank 1
AnneArents asked on 20 Jun 2013, 01:47 PM
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

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 25 Jun 2013, 08:12 AM
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.
Tags
Input
Asked by
AnneArents
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or