Gantt.net

  1. #1

    Gantt.net

    Hi,

    Im just starting a new project and want to integrate with the Gantt control from Bryntum. Ive loaded up all their samples into a .net project and get the following error:

    TypeError: this.node is null
    
    This is in the function 'getChecked()' in Ext.tree.view called 'getChecked()' in ext-all.js
    I've done a comparison of the ext-all.js that the ResourceManager serves up vs the ext-all.js that the gantt control uses and they are identical. I can only think that there must be an issue with the extnet-all.js that does something different.

    Do you know if anyone has this issue or has anyone successfully integrated Gantt.net into an Ext.net project??


    UPDATE:

    It looks like the call is being made by the extnet-all.js file from the Extended Ext.tree.view function called getCheckedNodes()



    Thanks for any help



    Thanks to anyone who can help???
    Last edited by geoffrey.mcgill; Jul 25, 2012 at 1:31 PM. Reason: please use [CODE] tags
  2. #2
    Hi,

    Which versions of Bryntum Gantt and Ext.NET are you testing with?

    Can you provide a simplified code sample demonstrating how your test Page is configured?

    You might also be interested in Ext.NET.Gantt (http://gantt.ext.net/), which is a full Ext.NET port of the Bryntum Gantt component. We've converted the Bryntum Gantt into an Ext.NET Component, so it functions just like any other Ext.NET Component and benefits from all the server-side functionality.

    The Ext.NET.Gantt Component is not publicly available, but if you email me directly (geoff@object.net), I can supply a Pre-Release version to test with.

    NOTE: [2013-12-19] Unfortunately, the Ext.NET versions of Gantt and Scheduler will not be released. Please contact Byntum (http://bryntum.com/) directly for a demo or purchase of the JavaScript only versions.
    Last edited by geoffrey.mcgill; Dec 19, 2013 at 10:51 PM.
    Geoffrey McGill
    Founder
  3. #3

    Attached sample

    Hi I tried to upload the zip file with my working files but it says invalid file....

    Ive emailed it to you directly....

    Otherwise my page looks like the following

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="GanttDemo.WebForm2" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Gantt Demo</title>
        <!-- Taken from examples on the documentation -->
        <link href="http://cdn.sencha.io/ext-4.1.0-gpl/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
        <link href="http://bryntum.com/examples/gantt-latest/resources/css/sch-gantt-all.css" rel="stylesheet" type="text/css" />
    
        <!-- Ive taken this line out as the Resource Manager will add its own version -->
        <!--<script src="http://cdn.sencha.io/ext-4.1.0-gpl/ext-all-debug.js" type="text/javascript"></script>-->
        
        
        <script src="gnt-all-debug.js" type="text/javascript"></script>
    
        <script src="example.js" type="text/javascript"></script>
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager runat="server" />
        <div>
        
        </div>
        </form>
    </body>
    </html>
    And the example.js looks like

    Ext.onReady(function () {
    
        var taskStore = Ext.create('Gnt.data.TaskStore', {
            autoLoad: true,
            proxy: {
                type: 'memory',
                reader: {
                    type: 'json'
                },
    
                data: [
                    {
                        "StartDate": "2010-01-18",
                        "EndDate": "2010-02-02",
                        "Id": 1,
                        "Name": "Planning",
                        "expanded": true,
                        "children": [
                            {
                                "StartDate": "2010-01-18",
                                "EndDate": "2010-01-26",
                                "Id": 2,
                                "leaf": true,
                                "Name": "Investigate",
                                "parentId": 1
                            },
                            {
                                "StartDate": "2010-01-22",
                                "EndDate": "2010-01-25",
                                "Id": 3,
                                "leaf": true,
                                "Name": "Investigate2",
                                "parentId": 1
                            },
                            {
                                "StartDate": "2010-01-28",
                                "EndDate": "2010-01-28",
                                "Id": 4,
                                "leaf": true,
                                "Name": "Investigate3",
                                "parentId": 1
                            }
                        ]
                    }
                ]
                // eof data
            }
            // eof proxy
        });
    
        var ganttPanel = Ext.create('Gnt.panel.Gantt', {
            height: 400,
            width: 1000,
    
            viewPreset: 'weekAndDayLetter',
    
            startDate: new Date(2010, 0, 15),
            endDate: Sch.util.Date.add(new Date(2010, 0, 15), Sch.util.Date.WEEK, 3),
    
            columns: [
                {
                    xtype: 'treecolumn',
                    header: 'Tasks',
                    sortable: false,
                    dataIndex: 'Name',
                    width: 200
                }
            ],
    
            taskStore: taskStore
        });
    
        ganttPanel.render(Ext.getBody());
    });
  4. #4
    Unfortunatelly, your sample project doesn't reproduce the issue
    Ext.Net call 'getChecked' method internally and 'this.node' can be null if you don't have root node

    You can try the following override to prevent that exception

    Ext.tree.View.override({
        getChecked: function() {
            var checked = [],
                  node  = this.node || (this.store && this.store.treeStore && this.store.treeStore.getRootNode());
            if(node){
                node.cascadeBy(function(rec){
                    if (rec.get('checked')) {
                        checked.push(rec);
                    }
                });
            }
            return checked;
        }
    });
    Last edited by Vladimir; Jul 26, 2012 at 2:02 PM.
  5. #5
    Thank you it works!

    Quote Originally Posted by Vladimir View Post
    Unfortunatelly, your sample project doesn't reproduce the issue
    Ext.Net call 'getChecked' method internally and 'this.node' can be null if you don't have root node

    You can try the following override to prevent that exception

    Ext.tree.View.override({
        getChecked: function() {
            var checked = [],
                  node  = this.node || (this.store && this.store.treeStore && this.store.treeStore.getRootNode());
            if(node){
                node.cascadeBy(function(rec){
                    if (rec.get('checked')) {
                        checked.push(rec);
                    }
                });
            }
            return checked;
        }
    });

Similar Threads

  1. [CLOSED] Ext gantt
    By marco.morreale in forum 2.x Legacy Premium Help
    Replies: 8
    Last Post: Jan 18, 2013, 1:22 PM
  2. Ext.Net + Ext.Gantt
    By ginsar in forum Open Discussions
    Replies: 8
    Last Post: Mar 19, 2012, 2:46 PM

Posting Permissions