jQWidgets Forums

jQuery UI Widgets Forums Navigation Tree jQxTree(load on demand) from database

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 12 years ago.

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

  • fakhar
    Member

    Hi…. I am working in ASP.Net MVC. I have used jqxtree plugin into my view. I have to make jqxtree ajax-supported i.e. i want its functionality of “Load on Demand”. I have maintained a database whose schema is somehow as: ID , Label, ParentID.
    I want a node to be filled by its children when it is expanded. Please help me in this regard that how to find ID of expanded item, receive data (ID & Label) from server and add it to tree using ajax. Please help.


    Peter Stoev
    Keymaster

    Hi,

    Have you looked at that sample: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxtree/ajaxloading.htm?web? In the sample, the Tree nodes are loaded through Ajax. A dummy node – “Loading…” is added to each tree node so the Expand Arrow is displayed. When the node is expanded, the Tree makes an Ajax request and dynamically adds the sub nodes and also removes the “Loading…” node. I believe the same approach could be used when working with DB as a data source. However, the difference would be that the Ajax requests should point to your server code which should return the appropriate Nodes formatted in the same way as in our sample.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.