This is a migrated thread and some comments may be shown as answers.
InlineEditTemplate Error on edit
11 Answers 114 Views
This is a migrated thread and some comments may be shown as answers.
localman
Top achievements
Rank 1
localman asked on 25 Nov 2007, 03:27 AM

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

Reference:
DataSubjectField="Name"

As you see, my subject field is Name, but when I double click to do an inline edit it pops up an error dialogue with the above text.

I have custom attributes on the page also.  If I add "Name" to the custom attributes list, then I dont get an error...but then it also just saves an empty string to the DB.

ideas?

thanks.

11 Answers, 1 is accepted

Sort by
0
localman
Top achievements
Rank 1
answered on 26 Nov 2007, 09:54 AM
I've yet to make headway on this.  Any suggestions?
0
Peter
Telerik team
answered on 26 Nov 2007, 05:40 PM
Hello Shane,

We will be happy to help you but we will need some additional information on this case. For example, how do you data-bind RadScheduler? What is the datasource which you use? Ideally, you can open a support ticket and send us a small demo project.


All the best,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
localman
Top achievements
Rank 1
answered on 26 Nov 2007, 07:11 PM
ok, will send.  thanks.
0
Josh Winkler
Top achievements
Rank 1
answered on 12 Feb 2008, 09:08 PM
Was there ever a resolution on this and if so could you please post it. I am having the same issue. Thanks.
0
Peter
Telerik team
answered on 13 Feb 2008, 07:56 AM
Hi Josh,

Thanks for your inquiry. Yes, there was a solution to this case:

"Please, be advised that when binding template controls you need to bind them to names of appointment's properties, not to column names. For example this line of code:

<asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>' style="margin-bottom:5px;"></asp:TextBox> 

should be

<asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Subject") %>' style="margin-bottom:5px;"></asp:TextBox> 

"

Let us know if this is applicable to your project as well or if you need further assistance.


All the best,
Peter
the Telerik team


Instantly find answers to your questions at the new Telerik Support Center
0
Josh Winkler
Top achievements
Rank 1
answered on 13 Feb 2008, 01:20 PM
So what if Im trying to add new resources other than what the scheduler offers like say appointment details and location. I add the custom attributes field, the resource types and an sqldatasource for the fields needed using the advanced edit template is this not allowed? I can run it w/o any errors but the fields come back as Telerik.UI.Databound or something of that nature instead of the actual value. Thanks so much in advance. Here is the code...

<%

@ Control Language="vb" AutoEventWireup="true" CodeBehind="Calendar.ascx.vb" Inherits="BCL0100.Calendar" %>

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<telerik:RadScheduler ID="RadScheduler1" runat="server" Skin="Vista" AllowDelete="False" AllowEdit="True" AllowInsert="False" FirstDayOfWeek="Sunday"LastDayOfWeek="Saturday" OverflowBehavior="Expand" SelectedView="DayView" DataEndField="InterviewTimeEnd" DataKeyField="AppointmentID" DataRecurrenceField="InterviewRecurrence" DataRecurrenceParentKeyField="InterviewRecurrenceKey" DataSourceID="bclwebsite" DataStartField="InterviewTime" DataSubjectField="InterviewSubject" OnDataBound="RadScheduler1_DataBound" CustomAttributeNames="InterviewNotes, InterviewerName">

<

ResourceTypes>

<telerik:ResourceType Name="InterviewNotes" TextField="InterviewNotes" ForeignKeyField="AppointmentID" KeyField="AppointmentID" DataSourceID="DetailsDataSource" />

<telerik:ResourceType Name="InterviewerName" TextField="InterviewerName" ForeignKeyField="InterviewerID" KeyField="SurveyCompletorID" DataSourceID="InterviewerDetailsDataSource" />

</

ResourceTypes>

<

AdvancedEditTemplate>

<

img src="..\..\Images\Misc\CalBG.gif" width="100%" height="28" border="0" />

<

div class="appointments">

<fieldset>

<%

--<legend>Appointment Details</legend>--%>

<asp:Image ID="CalendarIcon" runat="server" ImageAlign="absMiddle" ImageUrl="..\..\Images\Misc\CalendarIcon.gif" />&nbsp;<span class="larger-font"><asp:Literal ID="Subject" runat="server" Text='<%# Bind("Subject") %>' /> Appointment</span>

<div style="position: relative">

Date & Time:

<asp:Literal ID="StartDate" runat="server" Text='<%# Bind("Start") %>' /><br />

Interviewer:

<asp:Literal ID="InterviewerName" runat="server" Text='<%# Bind("?????") %>' /><br />

<br />

<asp:Literal ID="InterviewNotes" runat="server" Text='<%# Eval("InterviewNotes") %>' /><br />

</div>

<br />

<asp:LinkButton ID="CancelButton" runat="server" Text="Return to Calendar" CommandName="Cancel" />

</fieldset>

</

div>

</

AdvancedEditTemplate>

</

telerik:RadScheduler>

<

asp:SqlDataSource ID="bclwebsite" runat="server" ConnectionString="<%$ ConnectionStrings:bclWebsiteConnectionString %>" SelectCommand="SELECT [AppointmentID], [InterviewerID], [CompanyID], [InterviewTime], [InterviewDate], [InterviewSubject], [IntervieweeID], [InterviewTimeEnd], [InterviewNotes], [InterviewComplete], [CompleteNotes], [DateCanceled], [CancelNotes], [InterviewCancel], [DateComplete], [DateAdded], [AddedBy], [DateUpdated], [UpdatedBy], [InterviewRecurrenceKey], [InterviewRecurrence] FROM [Scheduler] WHERE (([InterviewComplete] = @InterviewComplete) AND ([InterviewCancel] = @InterviewCancel)) ORDER BY [InterviewDate] DESC, [InterviewTime] DESC" UpdateCommand="UPDATE Scheduler SET InterviewSubject = @Subject, InterviewTime = @Start, InterviewTimeEnd = @End , InterviewDate = @Date, InterviewNotes = @Notes, InterviewRecurrence = @RecurrenceRule, InterviewRecurrenceKey = @RecurrenceParentID WHERE (AppointmentID = @ID)">

<UpdateParameters>

<asp:Parameter Name="Subject" />

<asp:Parameter Name="Start" />

<asp:Parameter Name="End" />

<asp:Parameter Name="Date" />

<asp:Parameter Name="Notes" />

<asp:Parameter Name="RecurrenceRule" />

<asp:Parameter Name="RecurrenceParentID" />

<asp:Parameter Name="InterviewNotes" />

<asp:Parameter Name="IntervieweeID" />

<asp:Parameter Name="ID" />

</UpdateParameters>

<SelectParameters>

<asp:Parameter DefaultValue="False" Name="InterviewComplete" Type="Boolean" />

<asp:Parameter DefaultValue="False" Name="InterviewCancel" Type="Boolean" />

</SelectParameters>

</

asp:SqlDataSource>

<

asp:SqlDataSource ID="DetailsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:bclWebsiteConnectionString %>"

SelectCommand="SELECT [AppointmentID], [InterviewNotes], [IntervieweeID], [InterviewerID] FROM [Scheduler]"></asp:SqlDataSource>

<asp:SqlDataSource ID="InterviewerDetailsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:bclWebsiteConnectionString %>"SelectCommand="SELECT SurveyCompletorID, FirstName, LastName, FirstName + ' ' + LastName AS InterviewerName FROM Users"></asp:SqlDataSource>

<

br />

<

div>

<asp:ImageButton ID="RebindCalBtn" runat="server" ImageUrl="..\..\Images\Misc\ReloadBtn.gif" />

</

div>

0
rgf21
Top achievements
Rank 1
answered on 13 Feb 2008, 06:08 PM
I have the same problem!
0
Josh Winkler
Top achievements
Rank 1
answered on 14 Feb 2008, 01:00 PM
Is there a resolution on this case yet? Thanks.
0
Peter
Telerik team
answered on 14 Feb 2008, 01:12 PM
Hi Josh,

Custom Attributes do not have the restriction which the appointment's properties have. You can bind controls to fields from RadScheduler's data source by column name. For example

<asp:Literal ID="InterviewerName" runat="server" Text='<%# Bind("InterviewerName") %>' /> 

This will work as long as you have a column in your RadSchedueler's data source called "InterviewerName" and you have set CustomAttributeNames="InterviewerName".

I noticed that the InterviewerName in your code comes from another data source and this will cause problems. The InterviewerName must be a column in the "bclwebsite" data source.

I hope this helps.


All the best,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
localman
Top achievements
Rank 1
answered on 17 Feb 2008, 09:38 PM
Just got back into town.

anyone still having an issue with this, ill throw in some more feedback.
0
Josh Winkler
Top achievements
Rank 1
answered on 18 Feb 2008, 09:48 PM
Yes sir I still am. I have posted the code I am using and I am a newbie and not really understanding the previous instructions. All I need is to add the interviewers name to the update page and I have tried various ways to do so and all i get is the "Telerik.Web.UI.Resource" in the spot where I need the name. If you could help that would be great.

Again please keep in mind that I am a "newbie" to .net and have only been working with .net for 3 months now. Thanks in advance for your help!
Asked by
localman
Top achievements
Rank 1
Answers by
localman
Top achievements
Rank 1
Peter
Telerik team
Josh Winkler
Top achievements
Rank 1
rgf21
Top achievements
Rank 1
Share this question
or