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

ShowAdvancedInsertForm fails with an error

3 Answers 57 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Mika
Top achievements
Rank 2
Mika asked on 11 Aug 2008, 02:58 PM
A linkbutton should open an AdvancedInsertForm but instead I get:

Error serializing value 'Telerik.Web.UI.Appointment' of type 'Telerik.Web.UI.Appointment.'

Markup:
<asp:LinkButton ID="InsertEvent" runat="server">New Event</asp:LinkButton> 
 

Codebehind:
Protected Sub InsertEvent_Click(ByVal sender As ObjectByVal e As EventArgs) Handles InsertEvent.Click 
            RadScheduler1.ShowAdvancedInsertForm(DateTime.Now) 
End Sub 

Regards,
-mika-

3 Answers, 1 is accepted

Sort by
0
Mika
Top achievements
Rank 2
answered on 12 Aug 2008, 07:28 AM
More details:
"New Event" linkbutton is in a sidebar like in Google Calendar. Clicking the button fires
ShowAdvancedInsertForm(DateTime.Now).

Actually, this works when
AdvancedInsertForm or AdvancedEditForm is already open, but not when any of the calendar views is visible. Then I get the above error:
Error serializing value 'Telerik.Web.UI.Appointment' of type 'Telerik.Web.UI.Appointment.'

Advanced Form fields are defined in markup/codebehind inside <telerik:radscheduler> tag. Customized ascx templates are not used.

Is this a bug or do I make some mistake here?

Regards,
-mika-


0
T. Tsonev
Telerik team
answered on 14 Aug 2008, 07:56 AM
Hi Mika,

Please, excuse us for the late reply. The Click handler is executed too late in the page life-cycle and switching to the advanced form in this moment leaves the control in an incorrect state. We will investigate the issue and we will try to improve our code, so we can support this case.

Meanwhile, adding a call to Rebind should solve the issue:

Protected Sub InsertEvent_Click(ByVal sender As ObjectByVal e As EventArgs) 
    RadScheduler1.Rebind() 
    RadScheduler1.ShowAdvancedInsertForm(DateTime.Now) 
End Sub 

Hope this helps.

Best wishes,
Tsvetomir Tsonev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Mika
Top achievements
Rank 2
answered on 15 Aug 2008, 10:45 AM
Hi Tsvetomir,

Rebinding solved the issue. Thanks.

-mika-
Tags
Scheduler
Asked by
Mika
Top achievements
Rank 2
Answers by
Mika
Top achievements
Rank 2
T. Tsonev
Telerik team
Share this question
or