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

Data Binds two times in calender

3 Answers 79 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Janni
Top achievements
Rank 1
Janni asked on 12 Aug 2010, 07:24 AM
Hi,

I'm facing the issues in "Data Binding". In Appointment Template i placed two values as i shown the code below.
But in outcome, it the values are placing two times in the calender.

<

 

asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="RadScheduler1">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

</telerik:RadAjaxManager>

 

 

<telerik:RadAjaxLoadingPanel ID="radAjaxLoadingPanel1" runat="server" EnableEmbeddedSkins="false" />

 

 

<div style="width: 743px; height: 560px; background: transparent url('Images/background.png') no-repeat 0 0;

 

 

padding-top: 34px; padding-left: 7px;">

 

 

<div style="color: #000; font: 14px 'Segoe UI', Arial, sans-serif; position: static;

 

 

top: 5px; padding-left: 5px;">

 

My Schedule

 

</div>

 

 

<telerik:RadSplitter ID="radSplitter1" runat="server" PanesBorderSize="0" Skin="Web20"

 

 

Width="750" Height="500" Style="border: solid red 1px;">

 

 

<telerik:RadPane ID="leftPane" runat="server" Width="240px" MinWidth="240" MaxWidth="300"

 

 

Scrolling="None">

 

 

<div style="width: 220px; margin: 7px auto;">

 

 

<telerik:RadCalendar runat="server" ID="RadCalendar1" Skin="Web20" OnSelectionChanged="radCalendar1_SelectionChanged"

 

 

AutoPostBack="true" EnableMultiSelect="false" DayNameFormat="FirstTwoLetters"

 

 

OnDefaultViewChanged="radCalendar1_DefaultViewChanged" EnableNavigation="true"

 

 

EnableMonthYearFastNavigation="false">

 

 

</telerik:RadCalendar>

 

 

<telerik:RadCalendar ID="RadCalendar2" runat="server" Skin="Web20" OnSelectionChanged="radCalendar2_SelectionChanged"

 

 

AutoPostBack="true" EnableMultiSelect="false" DayNameFormat="FirstTwoLetters"

 

 

EnableNavigation="true" EnableMonthYearFastNavigation="false">

 

 

</telerik:RadCalendar>

 

 

</div>

 

 

</telerik:RadPane>

 

 

<telerik:RadSplitBar runat="server" ID="RadSplitBar2" CollapseMode="Forward" />

 

 

<telerik:RadPane runat="Server" ID="rightPane" Scrolling="None" Width="500px">

 

 

<telerik:RadScheduler runat="server" ID="RadScheduler1" Height="500px" Skin="Web20" CustomAttributeNames="StartTime,EndTime,SessionDate"

 

 

ShowViewTabs="true" ShowHeader="true" ShowFooter="true" SelectedDate="2010-07-11"

 

 

DataStartField="StartTime" DataEndField="EndTime" EnableDescriptionField="true"

 

 

DayStartTime="08:00:00" AllowInsert="false" AllowEdit="false" AllowDelete="false" ReadOnly="false"

 

 

DayEndTime="21:00:00" FirstDayOfWeek="Monday" DataKeyField="SessionId" DataSubjectField="SessionDate" Columns="1"

 

 

LastDayOfWeek="Friday" EnableEmbeddedSkins="false" OnNavigationComplete="radScheduler1_NavigationComplete">

 

 

<AdvancedForm Modal="true" />

 

 

 

 

<AppointmentTemplate >

 

 

 

<div style="text-align: left; margin: 0 0 3px; font-size: 11px; font-weight: bold;

 

 

color: #369; height: 17px; border-bottom: 1px solid #8bf; width: 100%;">

 

 

<asp:Label runat="server" Text='<%# Eval("StartTime")%>' ID="RecurrenceIcon" />

 

 

<asp:Label runat="server" Text='<%# Eval("EndTime")%>' ID="Label1" />

 

 

 

</div>

 

 

</AppointmentTemplate>

 

 

<ResourceTypes>

 

 

<telerik:ResourceType KeyField="ID" Name="SessionDate" TextField="SessionDate" ForeignKeyField="SessionDate" />

 

 

</ResourceTypes>

 

 

</telerik:RadScheduler>

 

 

</telerik:RadPane>

 

 

</telerik:RadSplitter>

 

 

</div>

 

</

 

asp:Content>

 


output:

(12) in date of calender
   
    12:00AM
    11.55PM
    12:00AM
    11.55PM

I need only one databind value..d\not to repeat two times.


Thanks,
Daniel.B

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 12 Aug 2010, 09:02 AM
Hi Janni,

That's unusual. We tried to replicate the problem, but to no avail. I recommend you open a support ticket and send us a simple working demo of the issue.


All the best,
Peter
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
Janni
Top achievements
Rank 1
answered on 12 Aug 2010, 10:15 AM
Hi Peter,

Thanks for your reply.
I've pasted my coded again also attached my output in this reply. pls see the attachment.
you can see in the attachment, the permit name is shown two time in the moth view also in the day view the width is not set , it shows only half of the text. so please tell me some suggestion for this issue

<
asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="radAjaxLoadingPanel1" runat="server" EnableEmbeddedSkins="false" />
    <div style="width: 743px; height: 560px; background: transparent url('Images/background.png') no-repeat 0 0;
        padding-top: 34px; padding-left: 7px;">
        <div style="color: #000; font: 14px 'Segoe UI', Arial, sans-serif; position: static;
            top: 5px; padding-left: 5px;">
            My Schedule
        </div>
        <telerik:RadSplitter ID="radSplitter1" runat="server" PanesBorderSize="0" Skin="Web20"
            Width="750" Height="500" Style="border: solid red 1px;">
            <telerik:RadPane ID="leftPane" runat="server" Width="240px" MinWidth="240" MaxWidth="300"
                Scrolling="None">
                <div style="width: 220px; margin: 7px auto;">
                    <telerik:RadCalendar runat="server" ID="RadCalendar1" Skin="Web20" OnSelectionChanged="radCalendar1_SelectionChanged"
                        AutoPostBack="true" EnableMultiSelect="false" DayNameFormat="FirstTwoLetters"
                        OnDefaultViewChanged="radCalendar1_DefaultViewChanged" EnableNavigation="true"
                        EnableMonthYearFastNavigation="false">
                    </telerik:RadCalendar>
                    <telerik:RadCalendar ID="RadCalendar2" runat="server" Skin="Web20" OnSelectionChanged="radCalendar2_SelectionChanged"
                        AutoPostBack="true" EnableMultiSelect="false" DayNameFormat="FirstTwoLetters"
                        EnableNavigation="true" EnableMonthYearFastNavigation="false">
                    </telerik:RadCalendar>
                </div>
            </telerik:RadPane>
            <telerik:RadSplitBar runat="server" ID="RadSplitBar2" CollapseMode="Forward" />
            <telerik:RadPane runat="Server" ID="rightPane" Scrolling="None" Width="500px">
                <telerik:RadScheduler runat="server" ID="RadScheduler1" Height="500px" Skin="Web20"
                    CustomAttributeNames="DisplayPermitName,StartTime,EndTime,SessionDate" ShowViewTabs="true" ShowHeader="true"
                    ShowFooter="true" SelectedDate="2010-07-11" DataStartField="StartTime" DataEndField="EndTime"
                    EnableDescriptionField="true" AppointmentStyleMode="Default" DayStartTime="08:00:00" AllowInsert="false" AllowEdit="false"
                    AllowDelete="false" ReadOnly="false" DayEndTime="21:00:00" FirstDayOfWeek="Monday"
                    DataKeyField="SessionId" DataSubjectField="SessionDate" Columns="1" LastDayOfWeek="Friday"
                    EnableEmbeddedSkins="false" OnNavigationComplete="radScheduler1_NavigationComplete">
                    <AdvancedForm Modal="true" />
                    <AppointmentTemplate>
                            <%--Permit Name--%>
                            <asp:Label runat="server" ID="labelDisplayPermitName" Width="300px" Text="Permit Name :">
                             <%# Eval("DisplayPermitName")%>
                            </asp:Label>
                            <br />
                            <%--Start Time--%>
                            <asp:Label runat="server" ID="labelStartTime" Width="300px" Text="Start Time :">
                             <%# Eval("StartTime")%>
                             <br />
                            </asp:Label>
                            <%--End Time--%>
                            <asp:Label runat="server" ID="labelEndTime" Width="300px" Text="End Time : ">
                             <%# Eval("EndTime")%>
                             <br />
                            </asp:Label>
                            <%--Session Date--%>
                            <asp:Label runat="server" ID="labelSessionDate" Width="300px" Text="Session Date :">
                             <%# Eval("SessionDate")%>
                             </asp:Label>
                             <br />
                    </AppointmentTemplate>                  
                </telerik:RadScheduler>
            </telerik:RadPane>
        </telerik:RadSplitter>
    </div>
</asp:Content>
0
Peter
Telerik team
answered on 16 Aug 2010, 03:42 PM
Hi Janni,

Please, try removing StartTime and EndTime from

CustomAttributeNames="DisplayPermitName,StartTime,EndTime,SessionDate"

since you already bind those fields for RadScheduler:

DataStartField="StartTime" DataEndField="EndTime"


Kind regards,
Peter
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
Janni
Top achievements
Rank 1
Answers by
Peter
Telerik team
Janni
Top achievements
Rank 1
Share this question
or