RadCalendar inside Repeater - need to know RepeaterItem

2 posts, 0 answers
  1. Axel
    Axel avatar
    41 posts
    Member since:
    Jul 2009

    Posted 14 Sep 2009 Link to this post

    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.

     

  2. Axel
    Axel avatar
    41 posts
    Member since:
    Jul 2009

    Posted 14 Sep 2009 Link to this post

    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

     

  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top