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

Telerik.Web.UI.Appointment does not contain a property

3 Answers 195 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Ed McCarroll
Top achievements
Rank 1
Ed McCarroll asked on 14 Jun 2010, 11:59 PM
I'm trying to use an <AppointmentTemplate> to display data for my scheduler.  I have my DataSubjectField="ClassName" and a "ClassName" column defined in the System.Data.DataTable that I'm using as my DataSource.

But the scheduler is ignoring my DataSubjectField setting and giving me this error:  DataBinding: 'Telerik.Web.UI.Appointment' does not contain a property with the name 'ClassName'.

Is there some kind of "UseMyNames='True'" setting that I also need?

Here's my scheduler:

<telerik:RadScheduler ID="schPlanner" 
    AllowEdit="false" 
    AllowInsert="false" 
    DataEndField="End" 
    DataKeyField="SessionId" 
    DataRecurrenceField="" 
    DataRecurrenceParentKeyField="" 
    DataStartField="Start" 
    DataSubjectField="ClassName" 
    DayEndTime="22:00:00" 
    DayStartTime="06:00:00" 
    Height="100%" 
    RowHeight="21px" 
    runat="server" 
    SelectedView="WeekView" 
    ShowAllDayRow="false" 
    ShowFooter="false" 
    ShowHeader="false" 
    Skin="Web20" 
    Width="100%" 
    WorkDayEndTime="22:00:00" 
    WorkDayStartTime="06:00:00"   
    > 
    <WeekView ColumnHeaderDateFormat="dddd" /> 
    <AppointmentTemplate> 
        <div class="rsCustomAppointmentContainer">  
            <h2> 
                <%#Eval("ClassName")%> 
            </h2> 
            <div> 
            </div> 
        </div> 
    </AppointmentTemplate> 
</telerik:RadScheduler> 
 

3 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 15 Jun 2010, 12:02 PM
Hello Ed,

The DataSubjectField value is only use to map the database value to the appointment subject. Once this is done the name of the original column is lost and the Subject is accessible directly:

<AppointmentTemplate>
    <div class="rsCustomAppointmentContainer"
        <h2>
            <%#Eval("Subject")%>
        </h2>
        <div>
        </div>
    </div>
</AppointmentTemplate>

I hope this helps.

Sincerely yours,
Tsvetomir Tsonev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
MohamadReza
Top achievements
Rank 1
answered on 28 Jul 2010, 08:30 PM
Cant we access another fields directly ??
for example i have a "EstimatedTime" field and i want to show it in AppointmentTemplate

Can i do it ?
0
T. Tsonev
Telerik team
answered on 03 Aug 2010, 08:39 AM
Hello,

You can access the string representations of other fields after registering them as "Custom attributes".

<telerik:RadScheduler runat="server" CustomAttributeNames="EstimatedTime" ... />

I hope this helps.

Best wishes,
Tsvetomir Tsonev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Scheduler
Asked by
Ed McCarroll
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
MohamadReza
Top achievements
Rank 1
Share this question
or