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

OnSelectedDateChanged event of RadTimePicker not firing from within a grid

5 Answers 303 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Alice Julia
Top achievements
Rank 1
Alice Julia asked on 18 Mar 2010, 02:27 PM
I have a RadTimePicker as one of the template columns in RadGrid. When i call the OnSelectedDateChanged event of the RadTimePicker it is not fired. I have set AutoPostBack also to true. But its not fired.

Any suggestions? Am i missing something?


5 Answers, 1 is accepted

Sort by
0
robertw102
Top achievements
Rank 1
answered on 18 Mar 2010, 05:19 PM
How are you attaching the event to the RadDateTimePicker control? In the code-behind or in the control?

If you are setting it in the code-behind, I would suggest to set the event handler in the control's declaration like:

<telerik:RadTimePicker id="RadTimePicker1" runat="server" OnSelectedDateChanged="RadTimePicker_OnSelectedDateChanged" />
0
Alice Julia
Top achievements
Rank 1
answered on 19 Mar 2010, 06:01 AM
I have added the event handler to the control's declaration only. Still it doesn't work. The control is inside the grid. So is there any other way to handle this?

My code:

        <EditItemTemplate >
            <telerik:RadTimePicker ID="txtStartTime" runat="server" OnSelectedDateChanged ="CheckDuration" AutoPostBack ="true" >
            </telerik:RadTimePicker>
        </EditItemTemplate>

    Protected Sub CheckDuration(ByVal sender As Object, ByVal e As Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs)

    End Sub





0
Iana Tsolova
Telerik team
answered on 23 Mar 2010, 03:17 PM
Hello Alice,

I followed your description and prepared a sample project attached to this post. However the SelectedDateChanged event of the RadTimePicker is fired properly on my side. Can you check it on your end and let me know how it goes and what differs in your case?

Sincerely yours,
Iana
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
Alice Julia
Top achievements
Rank 1
answered on 05 May 2010, 12:53 PM
This is strange. I followed all the steps but still i am not getting that event fired. Please help.

        <telerik:RadTimePicker ID="rtpEndTime" runat ="server" OnSelectedDateChanged ="rtpEndTime_SelectedDateChanged" AutoPostBack ="true" ></telerik:RadTimePicker>

    Protected Sub rtpEndTime_SelectedDateChanged(ByVal sender As Object, ByVal e As Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs)
        ScriptManager.RegisterStartupScript(Page, Page.GetType(), "asd", "alert('fired');", True)
    End Sub



0
Iana Tsolova
Telerik team
answered on 10 May 2010, 01:50 PM
Hi Alice,

I modified the sample so it runs in VB and the event is fired on my side. Try it on your end and let me know if it works and what differs in your case.

Greetings,
Iana
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.
Tags
Calendar
Asked by
Alice Julia
Top achievements
Rank 1
Answers by
robertw102
Top achievements
Rank 1
Alice Julia
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or