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

Expand column goes to NULL

7 Answers 100 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Tom
Top achievements
Rank 1
Tom asked on 25 Nov 2016, 06:59 AM

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.

7 Answers, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 29 Nov 2016, 02:58 PM
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.
0
Tom
Top achievements
Rank 1
answered on 29 Nov 2016, 04:27 PM

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 :-)

 

 

 

 

 

 

 

 

 

 

0
Tom
Top achievements
Rank 1
answered on 30 Nov 2016, 12:35 PM
I've send you the files by e-mail.
0
Peter Milchev
Telerik team
answered on 30 Nov 2016, 04:04 PM
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.
0
Tom
Top achievements
Rank 1
answered on 01 Dec 2016, 08:43 AM

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

0
Peter Milchev
Telerik team
answered on 06 Dec 2016, 09:11 AM
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.
0
Tom
Top achievements
Rank 1
answered on 08 Dec 2016, 01:18 PM
Thanks, I will follow it.
Tags
Gantt
Asked by
Tom
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Tom
Top achievements
Rank 1
Share this question
or