Our blazing fast Grid component built with pure JavaScript


Post by prashil »

Hello Bryntum,

I am using the Bryntum Tree Data Grid in my React Project ,But i have encountered one problem . I want the children data to be loaded from the server and initially only the parent element must be seen and the moment I expand the node a call should be made to the server and get the child element of that node. Since initially there is no data corresponding to the parent so by default the expand/collapse icon won't show but I want to show the icon .So to do that I passed children as true from the server but somehow an error message is showing on the screen and I am unable to debug that .

Can U Please guide me with it.

Attachments
Below is the code which I passed from server initially for Parent node
Below is the code which I passed from server initially for Parent node
Screenshot 2022-08-24 at 6.19.39 PM.png (27.77 KiB) Viewed 377 times
screenshot regarding show error message after loading the page.
screenshot regarding show error message after loading the page.
Screenshot 2022-08-24 at 4.30.58 PM.png (261.67 KiB) Viewed 377 times

Post by mats »

Please provide more context, what is your server returning? Can you please upload a full test case?


Post by prashil »

I referred this example (https://www.bryntum.com/examples/grid/treeloadondemand/ ) and have passed similar data from the server ,but somehow i am getting this error message while loading initially even thought response is coming as expected and there is no error in the console as well .

[
 {
    id: 1,
    name: "Kastrup Airport ",
    expanded: false,
    children: true,
  },
 {
    id: 2,
    name: "Kastrup Airport 2",
    expanded: false,
    children: true,
  },
]

Image

Attachments
Received from server.
Received from server.
Screenshot 2022-08-25 at 2.49.26 PM.png (828.79 KiB) Viewed 362 times

Post by alex.l »

All looks ok in parts you shared with us. Except extra commas in JSON example which is not valid format for JSON, but I guess that's parsed well by your backend.

We need to be able to replicate the problem. It works correct to me when I use JSON you shared (after I removed extra commas). Any chance to see the code you used? It would be great if you'll attach your runnable application, so we will be able to reproduce the problem and help you fast.

All the best,
Alex


Post Reply