We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Loading data on demand with treegrid

Hi

We have pretty big table to show in TreeGrid and I think we need some sort of load on demand functionality. I know that your current TreeGrid component dosen't have it and no "hasChild" eather.  

Our "dream treegrid" has: 
  -Hierarcial and conitnuous scrolling onDemand loadings.
  -Support for begin with all hierarchies open (I think that this is already possible but just saying)

Is this feature coming in near future?
Is this feature possible (and reasonable) to be done manually?

TreeGrid has expanding/collapsing events so I can replace "hasChild" with dummy placeholder subelement and start loading with datamanager by capturing those event(?)
But how to say to datagrid that even it has 10 elements, its actually should be scrollable to like there would be 1000 elements... and how to get information when user is scrolled so far that it should load more?

Btw we are just started to discover how your product fits to our needs. We have choose JavaScript pack provisionally but our backend runs on MVC 5 so you can suggest solutions outside JavaScript packet too.

1 Reply

MK Mahalakshmi Karthikeyan Syncfusion Team June 17, 2015 12:22 PM UTC

Hi Niko,

Thank you for using Syncfusion products.

Query 1: Hierarcial and conitnuous scrolling onDemand loadings.

Solution:

Currently there is no support for load-on demand feature in Treegrid control, but it has built-in support to render large data along with multi-level hierarchies in virtualization approach by using “EnableVirtualization” property. In virtualization mode the Treegrid control renders or we can able to visualize only few elements of data at a time ,depending upon the height of the Treegrid control (viewport/view height) , thereby increasing the responsiveness in Treegrid while scrolling, expanding ,collapsing and other such actions . In virtualization concept, the scrollbar or scroller of Treegrid is intended to render as if there are large data, as in your case 1000 elements for instance, but actually the elements which are viewable alone are rendered, even while scrolling the Treegrid content. You can achieve the virtualization in Treegrid with below code snippet ,

[JS]

        $("#TreeGridContainer").ejTreeGrid({

            //...

            enableVirtualization: true,

        });


[MVC]

          @(Html.EJ().TreeGrid("TreeGridContainer").

         //...

          .EnableVirtualization(true)

          )



We have also prepared a sample based on this and you can find the sample under the following location

Sample: https://www.syncfusion.com/downloads/support/forum/119398/ze/TreeGridMVC5-538488459

Query 2: Support for begin with all hierarchies open (I think that this is already possible but just saying)

Solution: By default while loading the TreeGrid all the parent items will be in expanded state . We can also expand all or collapse all the items dynamically with the help of toolbar action.


Please let us know if you need further assistance on this.

Regards,

Mahalakshmi K.


Loader.
Live Chat Icon For mobile
Up arrow icon