jQuery UI Widgets Forums TreeGrid Treegrid fails when first row doesn't have children

This topic contains 2 replies, has 2 voices, and was last updated by  Hristo 8 years, 7 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author

  • MohanV
    Participant

    Hi,
    I have data where the first row is not expandable or doesn’t have any children, in this case tree grid doesn’t render the data. But, when my first record is expandable or does have children it works fine. Can you explain me why is this unusual behaviour happening. Since, I can’t put my data. I have provided a sample data. This data has no child for the first row and only the second row has children. Treegrid doesn’t bind for this data. Please let me know whether I am missing any thing.

    [{
    “EmployeeID”: 2,
    “FirstName”: “Andrew”,
    “LastName”: “Fuller”,
    “Country”: “USA”,
    “Title”: “Vice President, Sales”,
    “HireDate”: “1992-08-14 00:00:00”,
    “BirthDate”: “1952-02-19 00:00:00”,
    “City”: “Tacoma”,
    “Address”: “908 W. Capital Way”,
    “expanded”: “true”
    }, {
    “EmployeeID”: 5,
    “FirstName”: “Steven”,
    “LastName”: “Buchanan”,
    “Country”: “UK”,
    “Title”: “Sales Manager”,
    “HireDate”: “1993-10-17 00:00:00”,
    “BirthDate”: “1955-03-04 00:00:00”,
    “City”: “London”,
    “Address”: “14 Garrett Hill”,
    “expanded”: “true”,
    children: [{
    “EmployeeID”: 6,
    “FirstName”: “Michael”,
    “LastName”: “Suyama”,
    “Country”: “UK”,
    “Title”: “Sales Representative”,
    “HireDate”: “1993-10-17 00:00:00”,
    “BirthDate”: “1963-07-02 00:00:00”,
    “City”: “London”,
    “Address”: “Coventry House Miner Rd.”
    }, {
    “EmployeeID”: 7,
    “FirstName”: “Robert”,
    “LastName”: “King”,
    “Country”: “UK”,
    “Title”: “Sales Representative”,
    “HireDate”: “1994-01-02 00:00:00”,
    “BirthDate”: “1960-05-29 00:00:00”,
    “City”: “London”,
    “Address”: “Edgeham Hollow Winchester Way”
    }, {
    “EmployeeID”: 9,
    “FirstName”: “Anne”,
    “LastName”: “Dodsworth”,
    “Country”: “UK”,
    “Title”: “Sales Representative”,
    “HireDate”: “1994-11-15 00:00:00”,
    “BirthDate”: “1966-01-27 00:00:00”,
    “City”: “London”,
    “Address”: “7 Houndstooth Rd.”
    }]
    }]


    MohanV
    Participant

    Can any one please help me with my above question. Should the first row of the tree grid have children is this mandatory or Am I missing any things. Thanks in advance.


    Hristo
    Participant

    Hello MohanV,

    Yes. You could set first element without any children.
    Please take a look this example: http://jsfiddle.net/txhi/qdx4bxt2/

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.