Hello,
I have followed the example shown in this article (http://www.telerik.com/support/kb/aspnet-ajax/scheduler/details/implement-related-radcombobox-controls-in-the-advanced-form) to add two Rad combo boxes to the appointment advanced edit form. In my case I need to have second combo box load based on the selection of the first combo box.
I also have code in the parent page FormCreated event to set the default value of the first combo box when the form is shown which is as follows:
'--- check for insert / edit mode
Select Case e.Container.Mode
Case SchedulerFormMode.AdvancedEdit '--- edit mode
'--- fall through
Case SchedulerFormMode.AdvancedInsert '--- insert mode
'--- for insert mode we want to select the user in the drop down to match this user
'--- get a reference to the drop down
cboUser = TryCast(e.Container.Controls(1).FindControl("cboUser"), RadComboBox)
'--- set the default user to this user
cboUser.SelectedValue = mobjAppointment.UserKey
End Select
What I have noticed is happening is that the FIRST time the advanced form is shown the OnSelectedIndexChanged event does NOT fire for the first combo box. However, upon subsequent inserts / edits the event DOES fire. If I comment out the code above in the FormCreated event, the OnSelectedIndexChanged event fires the first time as well.
So there appears to be an issue when setting the selected value property of a combo box on the advanced edit form and the OnSelectedIndexChanged event. I need the code above to set a default value (by user) in the first combo box. I'm not sure how to work around this.
Thank you.
I have followed the example shown in this article (http://www.telerik.com/support/kb/aspnet-ajax/scheduler/details/implement-related-radcombobox-controls-in-the-advanced-form) to add two Rad combo boxes to the appointment advanced edit form. In my case I need to have second combo box load based on the selection of the first combo box.
I also have code in the parent page FormCreated event to set the default value of the first combo box when the form is shown which is as follows:
'--- check for insert / edit mode
Select Case e.Container.Mode
Case SchedulerFormMode.AdvancedEdit '--- edit mode
'--- fall through
Case SchedulerFormMode.AdvancedInsert '--- insert mode
'--- for insert mode we want to select the user in the drop down to match this user
'--- get a reference to the drop down
cboUser = TryCast(e.Container.Controls(1).FindControl("cboUser"), RadComboBox)
'--- set the default user to this user
cboUser.SelectedValue = mobjAppointment.UserKey
End Select
What I have noticed is happening is that the FIRST time the advanced form is shown the OnSelectedIndexChanged event does NOT fire for the first combo box. However, upon subsequent inserts / edits the event DOES fire. If I comment out the code above in the FormCreated event, the OnSelectedIndexChanged event fires the first time as well.
So there appears to be an issue when setting the selected value property of a combo box on the advanced edit form and the OnSelectedIndexChanged event. I need the code above to set a default value (by user) in the first combo box. I'm not sure how to work around this.
Thank you.