Gantt Task and Dependencies

2 posts, 0 answers
  1. Jolan
    Jolan avatar
    19 posts
    Member since:
    Jul 2012

    Posted 31 Aug 2014 Link to this post

    hello guys

                i been trying to create a gantt using the beta version from Q2 2014 but i was always been prompted to cast specified when running my asp.net project create from VS2010..

    here is my table structure

    ProjectID (int)
    Project_ParentID(int)
    ProjectCode(varchar(30))
    ProjectDescription(varchar(200))
    PercentCompletion(int)
    Summary(int)
    StartDate(datetime)
    Endate(Datetime)

    i only got one master table for structured data i have ProjectID as a parentID and i have Project_ParentID which where the child been connected to it. now i cannot figure it out using one table to connect to Gantt datasource..binding the task datasource and dependencies datasource..here is my source code below

     <div style="overflow: scroll; height: 610px;">
                <telerik:RadGantt ID ="rdGantt" runat ="server" Height="450px"
                    SelectedView="MonthView" ResolvedRenderMode="Classic" DataSourceID ="sqldata1" DependenciesDataSourceID="sqldata1">
                    <DataBindings>
                        <TasksDataBindings IdField="ProjectID" OrderIdField="Project_ParentID" PercentCompleteField="PercentCompletion" SummaryField="Summary"           ParentIdField ="Project_ParentID" StartField ="StartDate" EndField="EndDate" TitleField ="ProjectDescription" />
                        <DependenciesDataBindings TypeField ="ProjectID" IdField ="ProjectID" PredecessorIdField="ProjectID" SuccessorIdField="Project_ParentID" />
                    </DataBindings>
                    
                </telerik:RadGantt>
                <asp:SqlDataSource runat ="server" ID ="sqldata1"
                    SelectCommand ="spu_tblProjectStructure_TelerikGantt"               
                    ConnectionString="<%$ ConnectionStrings:DAL.Properties.Settings.iProjectDBConnectionString %>"
                    SelectCommandType="StoredProcedure"></asp:SqlDataSource>
            </div>


    what i missing here.please help

    thanks

  2. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 01 Sep 2014 Link to this post

    Hi Jolan,

    This is the database structure you should  to use: http://www.telerik.com/help/aspnet-ajax/gantt-data-binding-database-structure.html You will have to create two tables - one for the tasks and one for the dependencies. Be sure that your database is compatible with the gantt. The official demo which uses SqlDataSources can be seen here: http://demos.telerik.com/aspnet-ajax/gantt/examples/overview/defaultcs.aspx#qsf-demo-source

    Sample project with Database is can be downloaded from here.

    I hope this helps.

    Regards,
    Hristo Valyavicharski
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top