jQuery UI Widgets Forums TreeGrid Check a node is parent or not

This topic contains 2 replies, has 2 voices, and was last updated by  younis barznji 9 years, 11 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Check a node is parent or not #64948

    younis barznji
    Participant

    Hi there how can check in treeGrid if a node is parent or not , or check it has children or not.
    thanks for replying.
    here is my selection node:

    var selection = $(“#treeGrid”).jqxTreeGrid(‘getSelection’);

    how to check selection has children or not?
    i checked selection.records but when it doesn’t has children it returns undefined, is there another way instead showing undefined?

    Check a node is parent or not #64954

    Dimitar
    Participant

    Hello younis barznji,

    You can either check if records is undefined or if the leaf field is true. These two mean that the selected row has no children.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Check a node is parent or not #64955

    younis barznji
    Participant

    thanks checking for undefined is working thank you very much for replying.

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

You must be logged in to reply to this topic.