Codeless entity binding

2 posts, 0 answers
  1. Scott
    Scott avatar
    3 posts
    Member since:
    Feb 2012

    Posted 10 Feb 2012 Link to this post

    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) 


  2. Plamen
    Admin
    Plamen avatar
    3078 posts

    Posted 15 Feb 2012 Link to this post

    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 >>
Back to Top