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

How to find a control in the header or footer

4 Answers 139 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 2
Joe asked on 27 Sep 2010, 06:58 PM
I'm trying to change using javascript the value of a control I have added to the footer of my list. For instance, I have added a asp.net label with id 'lblCount'. What would be the easiest way to find the control in my javascript?

Thanks,
Joe

4 Answers, 1 is accepted

Sort by
0
Accepted
Veronica
Telerik team
answered on 29 Sep 2010, 02:30 PM
Hi Joe,

At this moment finding a control in header/footer is not easy via javascript as you can not access the template element. You can do it easily server-side. Please take a look at the bottom of this help topic how.

All the best,
Veronica Milcheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Joe
Top achievements
Rank 2
answered on 30 Sep 2010, 09:27 PM
Hi Veronica,

I needed my change to work client-side only. But I was able to achieve the same effect using labels positioned outside the RadListBox. Thanks for the help.

Joe
0
Andrew
Top achievements
Rank 1
answered on 19 Apr 2011, 09:04 PM
Is it still the case that the header template controls cannot be access on the client-side?
0
Veronica
Telerik team
answered on 22 Apr 2011, 12:52 PM
Hi Andrew,

It depends on the control that you want to access in the header template. If you want to access some ASP.NET label for example - you can set some Css class to the label and later access the label by using $telerik.getElementByClassName() jQuery function.

All the best,
Veronica Milcheva
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
ListBox
Asked by
Joe
Top achievements
Rank 2
Answers by
Veronica
Telerik team
Joe
Top achievements
Rank 2
Andrew
Top achievements
Rank 1
Share this question
or