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

RadCalendar inside Repeater - need to know RepeaterItem

1 Answer 32 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Axel
Top achievements
Rank 2
Axel asked on 14 Sep 2009, 12:50 PM
Hi

I have a RadCalendar inside an asp:Repeater, and am trying to find out how I can know from what # RepeaterItem a

"OnSelectionChanged" event is coming from.
I.e. What I am trying to do is, when a date is clicked in my RadCalendar I need to know the state of a CheckBox inside the same RepeaterItem.

I have looked at the following candidates to do this:

1. Through Repeater_ItemCommand, but RadCalendar does not support attribute "CommandName", and this event does not seem to fire for the Repeater control when a date in radControl is clicked.

2. By trying to find the active RepeaterItem in event handler "SelectedDateChange(object sender, SelectedDatesEventArgs e)". Tried using the FindControl() through .Parent.Parent... but without luck.

would love help on this
Axel G.

 

1 Answer, 1 is accepted

Sort by
0
Axel
Top achievements
Rank 2
answered on 14 Sep 2009, 01:10 PM
Took 17 more minutes to find out how to do this.

Inside my "SelectedDateChange(object sender, SelectedDatesEventArgs e)" I was able to find the state of the checkbox inside the relevant RepeaterItem by using this bit of code.

var

 

x = (CheckBox)((RadCalendar)sender).Parent.FindControl("cbFullTime");

thanks
Axel

 

Tags
Calendar
Asked by
Axel
Top achievements
Rank 2
Answers by
Axel
Top achievements
Rank 2
Share this question
or