Shawn Iuliucci
Top achievements
Rank 1
Shawn Iuliucci
asked on 01 Oct 2007, 01:09 PM
I'm considering upgrading to prometheus and using the scheduler so I have been testing it out.
Problem: I have cascading drop downs in the InlineInsertTemplate so I can't two-way bind the second of the two drop downs without getting errors on the first drop downs post back. What I need to do is get a handle on the second drop down during the Inserting events so I can grab the selected value for the insert method. FindControl on the scheduler does not work and I don't know where to look for this object.
Problem: I have cascading drop downs in the InlineInsertTemplate so I can't two-way bind the second of the two drop downs without getting errors on the first drop downs post back. What I need to do is get a handle on the second drop down during the Inserting events so I can grab the selected value for the insert method. FindControl on the scheduler does not work and I don't know where to look for this object.
6 Answers, 1 is accepted
0
Hi Shawn Iuliucci,
I think the following online example might be helpful: http://www.telerik.com/DEMOS/ASPNET/Prometheus/Scheduler/Examples/Templates/DefaultCS.aspx
Check the code behind to see how to find a child control in the FormCreated event.
Regards,
Albert
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
I think the following online example might be helpful: http://www.telerik.com/DEMOS/ASPNET/Prometheus/Scheduler/Examples/Templates/DefaultCS.aspx
Check the code behind to see how to find a child control in the FormCreated event.
Regards,
Albert
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Shawn Iuliucci
Top achievements
Rank 1
answered on 01 Oct 2007, 03:15 PM
I did see this code. But this event is raised before I need the control. Are you suggesting that I can maybe put the handle in the Session or ViewState?
A little more info: I am handling the Inserting event of an ObjectDataSource.
A little more info: I am handling the Inserting event of an ObjectDataSource.
0
Hello Shawn,
In that case you should use the AppointmentCommand event. Here is a codesnippet:
//Cache the TextBox in an instance variable
private TextBox textBox;
protected void RadScheduler1_AppointmentCommand(object sender, AppointmentCommandEventArgs e)
{
if (e.CommandName == "Insert")
{
textBox = (TextBox)e.Container.FindControl("TextBox1");
}
}
Regards,
Albert
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
In that case you should use the AppointmentCommand event. Here is a codesnippet:
//Cache the TextBox in an instance variable
private TextBox textBox;
protected void RadScheduler1_AppointmentCommand(object sender, AppointmentCommandEventArgs e)
{
if (e.CommandName == "Insert")
{
textBox = (TextBox)e.Container.FindControl("TextBox1");
}
}
Regards,
Albert
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Shawn Iuliucci
Top achievements
Rank 1
answered on 01 Oct 2007, 06:02 PM
Great. This worked. Now on the edit I am using RadDateTime Picker controls for the start and end of the appointment with the dbselecteddate property two-way databound. The form shows on double click, except when I update the new selected times do not make it in. It sends the original date and time in.
Shawn
Shawn
0
Shawn Iuliucci
Top achievements
Rank 1
answered on 01 Oct 2007, 07:17 PM
Actually, this didn't work. The reference it gave me was of the dropdownlist before any cascading databinding occurred. Meaning: as long as I had the original selection on the first dropdownlist everything is ok. As soon as I changed the selection on the first dropdownlist which re-binds the second, it breaks. The reference in that event does not get the updated second dropdownlist.
Shawn
Shawn
0
Hello Shawn,
I think it would be best if you open a formal support ticket and send us a working excerpt of your project. This will help us better understand your scenario and provide a workaround. Please send us the URL of this forum thread so we can use it for our reference. Thanks.
Regards,
Albert
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
I think it would be best if you open a formal support ticket and send us a working excerpt of your project. This will help us better understand your scenario and provide a workaround. Please send us the URL of this forum thread so we can use it for our reference. Thanks.
Regards,
Albert
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center