RadScheduler AdvanceTemplate Overriding Issue

6 posts, 0 answers
  1. Adnan Aslam
    Adnan Aslam avatar
    14 posts
    Member since:
    May 2010

    Posted 04 Feb 2011 Link to this post

    Hello  i am using example of "SchedulerCustomAdvancedFormQ1_2010_SP1" as reference to override AdvanceTemplate and trying to create the replicate form but with different ID's and Name. Here is detail of what  i am trying to do. I am approximately half way through but dont know the source of error that is not letting this project functionality complete and i suspect there will be probably some sequence mistake.

    Project Reference : SchedulerCustomAdvancedFormQ1_2010_SP1

    Functionality:
    Instead of using Type and Resrouce as AdvanceTemplate Resources, i am trying to use Institute Name (InstituteName) and Institute Address (InstituteAddress) as resources in form of ComboBoxs.
    Backend in SQLdatabase, i am using three tables.
    1. Appointments
    2. Institute_Name
    3. Institute_Address

    Institute_Name primary key is Inst_Sr_Id and Institute_Address primary key is Inst_Add_Sr and both are Foreign Keys in Appointments table.

    Here is code that is used to bind their properties.
    'Type, Resource   
        <Bindable(BindableSupport.Yes, BindingDirection.TwoWay)> _
        Public Property InstituteName() As String
            Get
                Return InstituteNameComboBox.SelectedItem.Value
            End Get

            Set(ByVal value As String)
                InstituteNameComboBox.SelectedValue = value
            End Set
        End Property

        <Bindable(BindableSupport.Yes, BindingDirection.TwoWay)> _
        Public Property InstituteAddress() As String
            Get
                Return InstituteAddressComboBox.SelectedItem.Value
            End Get

            Set(ByVal value As String)
                InstituteAddressComboBox.SelectedValue = value
            End Set
        End Property

    Below is code that override InstituteName and InstituteAddress property and bind it to Control in AdvanceTemplate

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

    The above code did help me to store Appointment Information but it was not helping to store Institute Name and Institute Address value into database untill i added the following code:

    <telerik:ResourceType ForeignKeyField="Inst_Sr_Id"
                    KeyField="Inst_Sr_Id" Name="InstituteName" TextField="Inst_Name" />
    <telerik:ResourceType ForeignKeyField="Inst_Add_Sr"
                    KeyField="Inst_Add_Sr" Name="InstituteAddress" TextField="Inst_Address" />
    </ResourceTypes>

    Now the Appointment Color, Institute Name and Address are getting store properly in Database BUT, once i try to edit any appointment, Institute_Name and Institute_Address does't pick their default value that is stored in database. Their behavoir is kind of normal which means on return value from database to Advance control, Values are not getting bind.

    In AdvanceTemplate.ASCX, I am using two RadComboBox controll with Two SQLDatasource to populate data from database. Institute_Name popolate institute name data from Institute_Name table and on selection of any particular insitute, InstituteAddressComboBox change its data and pick all list of address that associate to particular Institute.

    Can you please look into code and suggest for the following Issue
    1. why Two way binding is not working for RadComboBox ( InstituteName and InstituteAddress)
    2. In Appointment Template why the following Code is not working.
    <AppointmentTemplate>
              <div class="rsAptSubject">
                    <h3><%# Eval("Subject") %></h3>
               </div>
                    <%# Eval("Description") %>
                <P>
                        Institute : <i><%#Eval("InstituteName.Text")%></i>
                </P>
                 <P>
                      Address : <i><%#Eval("InstituteAddress.Text")%></i>
                  </P>
    </AppointmentTemplate>

    I have Also changed the CustomAttributeNames to :
    CustomAttributeNames="AppointmentColor,InstituteName,InstituteAddress"

    May be i am asking too much ! or may be i have explained alot and problem could be minor. Please help so i may assemble it for demonstration to my supirors.

    Regards
    Adnan
  2. Adnan Aslam
    Adnan Aslam avatar
    14 posts
    Member since:
    May 2010

    Posted 05 Feb 2011 Link to this post

    Fox anyone with  one with solution please ?
  3. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 09 Feb 2011 Link to this post

    Hi Adnan Aslam,

    Could you, please, open a support ticket and send us a sample project?


    Regards,
    Nikolay Tsenkov
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  4. Adnan Aslam
    Adnan Aslam avatar
    14 posts
    Member since:
    May 2010

    Posted 09 Feb 2011 Link to this post

    Hello Nikolay,

    Would you please guide, how to attach project. Attach Files only Allowed extensions: .gif, .jpg, .jpeg, .png  ? how to attach .zip file.

    When click onthis link - http://www.telerik.com/support.aspx and select the appropriate product. Where next do i need to click to upload project.

    Help.
    Adnan
  5. Adnan Aslam
    Adnan Aslam avatar
    14 posts
    Member since:
    May 2010

    Posted 24 Feb 2011 Link to this post

    Products Feedback ID:394535 -- RadScheduler AdvanceTemplate Overriding Issue


    May i have update on my previous request that is mentioned above please ?

    i am desperatedly waiting for your response guyz.

    Regards
    Adnan
  6. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 01 Mar 2011 Link to this post

    Hi Adnan Aslam,

    I have posted an answer to your "product feedback".


    Regards,
    Nikolay Tsenkov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top