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

Add a CheckBox to the Appointment

2 Answers 128 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jagat
Top achievements
Rank 1
Jagat asked on 30 Oct 2013, 03:31 PM
Hi,

I'm trying to add a CheckBox to the Edit and Insert forms. I've added a usercontrol AdvancedForm.ascx

<%@ Register TagPrefix="scheduler" TagName="AdvancedForm" Src="AdvancedForm.ascx" %>

<AdvancedEditTemplate>
                    <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit" Subject='<%# Bind("Subject") %>'
                         Description='<%# Bind("Description") %>' Start='<%# Bind("Start") %>' End='<%# Bind("End") %>' AllUsers='<%# Bind("AllUsers") %>'/>
               </AdvancedEditTemplate>
               <AdvancedInsertTemplate>
                    <scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert" Subject='<%# Bind("Subject") %>'
                         Start='<%# Bind("Start") %>' End='<%# Bind("End") %>' Description='<%# Bind("Description") %>' AllUsers='<%# Bind("AllUsers") %>'  />
               </AdvancedInsertTemplate>


And in the AdvancedForm.aspx, I've added this code

   <asp:CheckBox ID="cboxAllUsers" runat="server" Text="All Users" />

   
[Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]
     public bool AllUsers
     {
         get
         {
             return cboxAllUsers.Checked;
         }
 
         set
         {
             cboxAllUsers.Checked = value;
         }
     }

I'm getting this error 

DataBinding: 'Telerik.Web.UI.Appointment' does not contain a property with the name 'AllUsers'.


How do I fix this error?


Thanks!

2 Answers, 1 is accepted

Sort by
0
Jagat
Top achievements
Rank 1
answered on 31 Oct 2013, 01:33 PM
Can someone please answer this question?

Thanks!
0
Boyan Dimitrov
Telerik team
answered on 04 Nov 2013, 11:12 AM
Hello,

Please try to add the "AllUsers" as custom attribute in the RadScheduler markup code? In the following code library resource you may find the "Appointment color" declared as custom attribute. You may implement very similar functionality with your "AllUsers" check box.

Regards,
Boyan Dimitrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Scheduler
Asked by
Jagat
Top achievements
Rank 1
Answers by
Jagat
Top achievements
Rank 1
Boyan Dimitrov
Telerik team
Share this question
or