Problem on DropDownList on AppointmentTemplate

1 posts, 0 answers
  1. shahab
    shahab avatar
    58 posts
    Member since:
    Mar 2009

    Posted 02 May 2013 Link to this post

    I want to show some data on AppointmentTemplate which is foreign key. I used this code:
    <AppointmentTemplate>
        <div class="rsCustomAppointmentContainer" dir="rtl" style="min-height: 40px; text-align: center;">
            <h2>
                <%# Eval("Subject") %>
            </h2>
            <br />
            <div>                                                 
                 <telerik:RadComboBox runat="server" ID="DoctorAppointmentRadComboBox" DataTextField="Name"
                    DataValueField="Id" Width="97%" Skin="Office2007" Enabled="false" SelectedValue='<%# Eval("DoctorAppointmentId") %>'
                    DataSourceID="DoctorAppointmentsEntityDataSource">
                </telerik:RadComboBox>
            </div>
        </div>
    </AppointmentTemplate>

    and filter Scheduler with another DropDownlist.
    But I got " Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control' error. Is there another solution to show value of foreign key.
Back to Top