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

[Solved] AutopostBack in Insert Template

1 Answer 112 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 2
Andrew asked on 20 Jul 2009, 10:22 AM
Hello,

When I run the code below, postback, the data binds disappears completely, what is the solution to keep the data and just change the radcombobox?

Protected Sub RadScheduler1_FormCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerFormCreatedEventArgs) Handles RadScheduler1.FormCreated 
 
   Dim CB_Groupe As RadComboBox = TryCast(e.Container.FindControl("CB_Groupe"), RadComboBox) 
   Dim CB_Forfait As RadComboBox = TryCast(e.Container.FindControl("CB_Forfait"), RadComboBox) 
   CB_Forfait.Items.Add(New Telerik.Web.UI.RadComboBoxItem(CB_Groupe.SelectedValue)) 
   CB_Groupe.AutoPostBack = True 
   AddHandler CB_Groupe.SelectedIndexChanged, AddressOf CB_Groupe_SelectedIndexChanged 
 
End Sub 
 
Protected Sub CB_Groupe_SelectedIndexChanged(ByVal o As Object, ByVal e As RadComboBoxSelectedIndexChangedEventArgs) 
   Lbl_titre.Text = "j'ai changĂ©" 
End Sub 

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 20 Jul 2009, 01:30 PM
Hi Andrew,

One possible solution is to store the appointment id in session in FormCreated. Then in SelectedIndexChanged, find the appointment and call RadScheduler's UpdateAppointment() and ShowAdvancedEditForm() methods. Similar approach is described in the following forum thread:
http://www.telerik.com/community/forums/aspnet-ajax/scheduler/selected-index-changed-for-resource-collection.aspx#884625


All the best,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Scheduler
Asked by
Andrew
Top achievements
Rank 2
Answers by
Peter
Telerik team
Share this question
or