jQuery UI Widgets › Forums › TreeGrid › Treegrid fails when first row doesn't have children
Tagged: angular treegrid, bootstrap treegrid, first element without children, javascript treegrid, jquery treegrid, jqwidgets treegrid, jqxTreeGrid
This topic contains 2 replies, has 2 voices, and was last updated by Hristo 8 years, 7 months ago.
-
Author
-
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.”
}]
}]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.
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 HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.