skip navigation
Telerik UI for ASP.NET AJAX
Product Bundles
DevCraft
All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
NEW
: Design Kits for Figma
Online Training
Document Processing Library
Embedded Reporting for web and desktop
Web
Kendo UI
UI for jQuery
UI for Angular
UI for React
UI for Vue
UI for Blazor
UI for ASP.NET Core
UI for ASP.NET MVC
UI for ASP.NET AJAX
Mobile
UI for .NET MAUI
UI for Xamarin
Document Management
Telerik Document Processing
Desktop
UI for .NET MAUI
UI for WinUI
UI for WinForms
UI for WPF
Reporting & Mocking
Telerik Reporting
Telerik Report Server
Telerik JustMock
Automated Testing
Test Studio
Test Studio Dev Edition
CMS
Sitefinity
UI/UX Tools
ThemeBuilder
Design System Kit
Debugging
Fiddler
Fiddler Everywhere
Fiddler Classic
Fiddler Jam
FiddlerCap
FiddlerCore
Extended Reality
UI for Unity XR
Free Tools
JustAssembly
JustDecompile
VB.NET to C# Converter
Testing Framework
View all products
Overview
Demos
Roadmap
What's New
Roadmap
Release History
Migrate to Blazor
Docs & Support
Support and Learning
Support and Learning Hub
Docs
Demos
Virtual Classroom
Forums
Videos
Blogs
Accessibility and Security
Submit a Ticket
Productivity and Design Tools
Visual Studio Extensions
ThemeBuilder
Embedded Reporting
Pricing
Shopping cart
Login
Contact Us
Try now
close mobile menu
Telerik Forums
/
UI for ASP.NET AJAX
This is a migrated thread and some comments may be shown as answers.
Access Data Bound To Rotator
1 Answer
71 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Brad
Top achievements
Rank 1
Brad
asked on
04 Jun 2009,
03:04 PM
How can I access the DataRow thats bound to the specific Rotator Item when I am handling the ServerSide Click Event?
Add a comment
Submit comment
Cancel
1 Answer
, 1 is accepted
Sort by
Score
Date
0
Accepted
Fiko
Telerik team
answered on
05 Jun 2009,
06:44 AM
radrotator.zip
Hello Brad,
The arguments that is passed to the
ItemClick
event handler has property
Item
that is the item that is clicked. This way you can found the desired field inside the item template by using its
FindControl
function as follow :
protected
void
RadRotator1_ItemClick(
object
sender, Telerik.Web.UI.RadRotatorEventArgs e)
{
Label firstName = e.Item.FindControl(
"lblFirstName"
)
as
Label;
lblSelectedFName.Text = firstName.Text;
Label lastName = e.Item.FindControl(
"lblLastName"
)
as
Label;
lblSelectedLName.Text = lastName.Text;
}
The RadRotator's declaration is :
<
telerik:RadRotator
ID
=
"RadRotator1"
runat
=
"server"
DataSourceID
=
"AccessDataSource1"
Height
=
"100px"
Width
=
"50px"
ItemHeight
=
"100px"
ItemWidth
=
"50px"
OnItemClick
=
"RadRotator1_ItemClick"
>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblFirstName"
runat
=
"server"
Text
=
'<%# DataBinder.Eval(Container.DataItem, "Firstname") %>'
>
</
asp:Label
>
<
asp:Label
ID
=
"lblLastName"
runat
=
"server"
Text
=
'<%# DataBinder.Eval(Container.DataItem, "LastName") %>'
>
</
asp:Label
>
</
ItemTemplate
>
</
telerik:RadRotator
>
For your convenience I have attached the full demo to the thread(including the datasource).
I hope this helps.
Kind regards,
Fiko
the Telerik team
Instantly find answers to your questions on the new
Telerik Support Portal
.
Check out the tips
for optimizing your support resource searches.
Add a comment
Submit comment
Cancel
Answer this question
Drag and drop files here or
browse
to attach...
Browse
for files to attach...
Supported file types: PNG, JPG, JPEG, ZIP, RAR, TXT. Max total file size - 20MB.
Submit answer
Cancel
Tags
Rotator
Asked by
Brad
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Share this question
or
Copy link