Expand column goes to NULL

8 posts, 0 answers
  1. Tom
    Tom avatar
    6 posts
    Member since:
    Jun 2016

    Posted 25 Nov 2016 Link to this post

    When I move tasks around it ends up with an error. Especially when I move a task to an earlier point in time.

    The problem is: Telerik (let's call it like that) updates automaticly, but a NULL-value is assigned to a random record in the Expanded column.

    And the Gantt doesn't allow this value because its a bit so. 1 or 0

     

    Help please.

  2. Peter Milchev
    Admin
    Peter Milchev avatar
    195 posts

    Posted 29 Nov 2016 Link to this post

    Hello Tom,

    Would you please try to recreate this issue on our online demos? As demonstrated in this screencast, no errors are thrown when moving an event forwards and backwards. 

    If the erroneous behavior is not reproduced in our demos, would you please create a very simplified sample runnable project that represents the issue and send it to us? Thus, we would be able to investigate locally and help you more efficiently. 

    Regards,
    Peter Milchev
    Telerik by Progress
    Telerik UI for ASP.NET AJAX is ready for Visual Studio 2017 RC! Learn more.
  3. Tom
    Tom avatar
    6 posts
    Member since:
    Jun 2016

    Posted 29 Nov 2016 in reply to Peter Milchev Link to this post

    Hello Peter,

     

    Well, to your suprise maybe but I don't do anything special. I drag and drop a Gantt to my page.

    I do exactly what your instructions show in the 'manual'.

    Next, I have remove the most of the sql-instructions and end up with only this:

            <asp:SqlDataSource
                ID="TasksDataSource"
                runat="server"
                ConnectionString="<%$ ConnectionStrings:SchedulerConnectionString %>"
                SelectCommand="SELECT * FROM [GanttTasks]"
                UpdateCommand="UPDATE [GanttTasks] SET [ParentID] = @ParentID, [OrderID] = @OrderID, [Title] = @Title, [Start] = @Start, [End] = @End, [PercentComplete] = @PercentComplete, [Expanded] = @Expanded, [Summary] = @Summary WHERE [ID] = @ID" DeleteCommand="DELETE FROM [GanttTasks] WHERE [ID] = @ID" InsertCommand="INSERT INTO [GanttTasks] ([ParentID], [OrderID], [Title], [Start], [End], [PercentComplete], [Expanded], [Summary]) VALUES (@ParentID, @OrderID, @Title, @Start, @End, @PercentComplete, @Expanded, @Summary)">
                <DeleteParameters>
                    <asp:Parameter Name="ID" Type="Int32" />
                </DeleteParameters>
                <InsertParameters>
                    <asp:Parameter Name="ParentID" Type="Int32" />
                    <asp:Parameter Name="OrderID" Type="Int32" />
                    <asp:Parameter Name="Title" Type="String" />
                    <asp:Parameter Name="Start" Type="DateTime" />
                    <asp:Parameter Name="End" Type="DateTime" />
                    <asp:Parameter Name="PercentComplete" Type="Decimal" />
                    <asp:Parameter Name="Expanded" Type="Boolean" />
                    <asp:Parameter Name="Summary" Type="Boolean" />
                </InsertParameters>
                <UpdateParameters>
                    <asp:Parameter Name="ParentID" Type="Int32" />
                    <asp:Parameter Name="OrderID" Type="Int32" />
                    <asp:Parameter Name="Title" Type="String" />
                    <asp:Parameter Name="Start" Type="DateTime" />
                    <asp:Parameter Name="End" Type="DateTime" />
                    <asp:Parameter Name="PercentComplete" Type="Decimal" />
                    <asp:Parameter Name="Expanded" Type="Boolean" />
                    <asp:Parameter Name="Summary" Type="Boolean" />
                    <asp:Parameter Name="ID" Type="Int32" />
                </UpdateParameters>
            </asp:SqlDataSource>
            <asp:SqlDataSource
                ID="DependenciesDataSource"
                runat="server"
                ConnectionString="<%$ ConnectionStrings:SchedulerConnectionString %>"
                SelectCommand="SELECT * FROM [GanttDependencies]">
            </asp:SqlDataSource>
            <asp:SqlDataSource
                ID="ResourcesDataSource"
                runat="server"
                ConnectionString="<%$ ConnectionStrings:SchedulerConnectionString %>"
                SelectCommand="SELECT * FROM [GanttResources]"></asp:SqlDataSource>
            <asp:SqlDataSource
                ID="AssignmentsDataSource"
                runat="server"
                ConnectionString="<%$ ConnectionStrings:SchedulerConnectionString %>"
                SelectCommand="SELECT * FROM [GantResourceAssignment]"></asp:SqlDataSource>

     

    Then, we need a wide gannt so in the code behind we've added:

                RadGantt1.RangeStart = DateTime.Now;
                RadGantt1.RangeEnd = DateTime.Now.AddDays(90);

     

    and, (found somewhere I don't remember where:

            private const string TasksKey = "Telerik.GanttSample.Tasks";
            private const string DependenciesKey = "Telerik.GanttSample.Dependencies";

     

    We use a MS-SQL server 2016 express.

    The RadGannt itself:

            <telerik:RadGantt
                ID="RadGantt1"
                runat="server"
                Skin="Silk"
                RenderMode="Native" 
                DataSourceID="TasksDataSource"
                DependenciesDataSourceID="DependenciesDataSource"
                ResourcesDataSourceID="ResourcesDataSource"
                AssignmentsDataSourceID="AssignmentsDataSource"
                AutoGenerateColumns="False"
                EnableResources="True"
                AllowTaskDelete="False"
                AllowTaskInsert="True"
                AllowDependencyInsert="False"
                AllowDependencyDelete="False"
                AllowPercentCompleteDrag="False"           
                YearView-UserSelectable="true"
                SelectedView="WeekView"
                OnTaskUpdate="RadGantt1_TaskUpdate"
                WeekView-DayHeaderDateFormat="dd/MM"
                DayView-DayHeaderDateFormat="dd/MM"
                MonthView-MonthHeaderDateFormat="dd/MM"
                WeekView-WeekHeaderDateFormat="dd/MM">
                <Localization HeaderDay="Dag" HeaderMonth="Maand" HeaderYear="Jaar" />
                <Columns>
                    <telerik:GanttBoundColumn DataField="Title" DataType="String" HeaderText="Projecten" AllowSorting="false" AllowEdit="false"  />
                </Columns>
                <DataBindings>
                    <TasksDataBindings
                        IdField="ID" 
                        ParentIdField="ParentID"
                        StartField="Start" 
                        EndField="End"
                        OrderIdField="OrderID"
                        SummaryField="Summary"
                        TitleField="Title" 
                        PercentCompleteField="PercentComplete"
                        ExpandedField="Expanded"
                          />
                    <DependenciesDataBindings
                        TypeField="Type" 
                        IdField="ID"
                        PredecessorIdField="PredecessorID"
                        SuccessorIdField="SuccessorID" />
                    <ResourcesDataBindings
                        IdField="ID"
                        ColorField="Color"
                        TextField="Name" />
                    <AssignmentsDataBindings
                         IdField="ID"
                         TaskIdField="TaskID"
                         UnitsField="Units"
                         ResourceIdField="ResourceID" />
                </DataBindings>
            </telerik:RadGantt>

     

    And some managers:

            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            </telerik:RadAjaxManager>
            <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
            </telerik:RadStyleSheetManager>
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
                <Scripts>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
                    </asp:ScriptReference>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
                    </asp:ScriptReference>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
                    </asp:ScriptReference>
                </Scripts>
            </telerik:RadScriptManager>

     

    That's it, not so different from the Original.

    I hope you can help :-)

     

     

     

     

     

     

     

     

     

     

  4. Tom
    Tom avatar
    6 posts
    Member since:
    Jun 2016

    Posted 30 Nov 2016 in reply to Tom Link to this post

    I've send you the files by e-mail.
  5. Peter Milchev
    Admin
    Peter Milchev avatar
    195 posts

    Posted 30 Nov 2016 Link to this post

    Hello Tom,

    Thank you for sending us your project.

    The "expanded" column is of type "bit" but it should allow nulls as per the Database Structure article. Please find attached the project we prepared based on the provided files. Adding the Telerik.Web.UI.dll and Telerik.Web.UI.Skins.dll to the Bin folder should be sufficient to run the project. Would you please check if it behaves correctly on your side also? 

    If the attached project is different than yours, would you please modify it so that it reproduces the error and send it back to us as an attachment in an official support ticket? Also, we would appreciate it if you could provide us more detailed steps for reproducing the issue.

    Regards,
    Peter Milchev
    Telerik by Progress
    Telerik UI for ASP.NET AJAX is ready for Visual Studio 2017 RC! Learn more.
  6. Tom
    Tom avatar
    6 posts
    Member since:
    Jun 2016

    Posted 01 Dec 2016 in reply to Peter Milchev Link to this post

    Hello Peter, your atteched file has the same problem I face.

     

    When moving stuff around, everything goes fine.

    But when I collapse a main Task and another around it goes wrong.

    I will send you screenshots and show what goes wrong.

     

    pic 1: A 'main' Task with serveral Childs.

    pic 2: created another Main task

    pic 3. moving tasks around (works fine)

    pic 4: Collapsing Main Task

    pic 5 Showing Value in database column Expanded = True even after Collasing

    Then I move the Task "TestTaks" around (important: this is the moment things go wrong)

    pic 6 Showing of Error (Server Error in '/' Application.

    pic 7 Showing Value in database column Expanded = NULL

  7. Peter Milchev
    Admin
    Peter Milchev avatar
    195 posts

    Posted 06 Dec 2016 Link to this post

    Hello Tom,

    Thank you for the clarifications and detailed steps.

    We were able to observe the faulty behavior and we have logged it as a bug in our Telerik Ajax Feedback and Ideas portal where you could follow the bug status.

    As a token of gratitude for identifying this issue I updated your Telerik points.

    Regards,
    Peter Milchev
    Telerik by Progress
    Telerik UI for ASP.NET AJAX is ready for Visual Studio 2017 RC! Learn more.
  8. Tom
    Tom avatar
    6 posts
    Member since:
    Jun 2016

    Posted 08 Dec 2016 in reply to Peter Milchev Link to this post

    Thanks, I will follow it.
Back to Top