Add a CheckBox to the Appointment

3 posts, 0 answers
  1. Jagat
    Jagat avatar
    135 posts
    Member since:
    Jan 2011

    Posted 30 Oct 2013 Link to this post

    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. Jagat
    Jagat avatar
    135 posts
    Member since:
    Jan 2011

    Posted 31 Oct 2013 Link to this post

    Can someone please answer this question?

    Thanks!
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 04 Nov 2013 Link to this post

    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.
Back to Top