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

Codeless entity binding

1 Answer 42 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 11 Feb 2012, 02:56 AM
Hello, I am trying to bind my scheduler to a database and I am having trouble. I am just trying to do the basics following the codeless example I was on the site.

I added the entity data source to my project and through the wizard I went through and set it up pointing to my online database. It saw my tables and I was able to select them. I also checked off the insert, update, delete. So I know the issue is not being able to see the database.

Next I set the scheduler data id to the it of the entity data source.

Below is all the code on the page I have.

<asp:EntityDataSource runat="server" ID="EntityDataSource1" ConnectionString="name=on2wheelsEntities"
DefaultContainerName="on2wheelsEntities" EntitySetName="Scheduals" EnableDelete="True"
EnableInsert="True" EnableUpdate="True" EnableFlattening="False" 
        EntityTypeFilter="Schedual">
</asp:EntityDataSource>

    <telerik:RadScheduler Height="600px" ID="RadScheduler1" runat="server" SelectedView="MonthView"
    DataDescriptionField="Description" DataEndField="EndTime" DataKeyField="Key" 
    DataSourceID="EntityDataSource1" DataStartField="StartTime" 
    DataSubjectField="Subject" EnableDescriptionField="True">
    </telerik:RadScheduler>

    <telerik:RadAjaxManager runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>


I made a table just for the scheduler to add items to. I have the following structure:

Id (Primary key)(int)(auto increment)(Not Nullable)(not used with scheduler)
StartTime (datetime)(Nullable) 
EndTime (datetime)(Nullable) 
Subject (varchar100)(Nullable) 
Description (varcharmax)(Nullable) 
Key (int)(Nullable) 


1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 15 Feb 2012, 03:26 PM
Hello Scott,

 
I have attached a working sample web page that is based on our EntityDataSource demo.

Hope this will be helpful.

Regards,
Plamen Zdravkov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Scheduler
Asked by
Scott
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or