jQWidgets Forums

jQuery UI Widgets Forums Navigation Tree Xml Binding

Tagged: , ,

This topic contains 3 replies, has 2 voices, and was last updated by  marchip 12 years, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Xml Binding Posts
  • Xml Binding #10707

    marchip
    Member

    How it’s possible to bind this xml in a tree grouping by field ‘category’ ?

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <functions>
        <function>
            <category>Ceil</category>
            <simpleSignature>String StandardFunction.Ceil(Double a)</simpleSignature>
        </function>
        <function>
            <category>String</category>
            <simpleSignature>Boolean StandardFunction.Contains(String a,CharSequence s)</simpleSignature>
        </function>
    </functions>
    Xml Binding #10712

    Dimitar
    Participant

    Hello marchip,

    Please check out the demo XML Tree. We hope it is useful to you.

    Best Regards,
    Dimitar

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

    Xml Binding #10714

    marchip
    Member

    I’ve already seen the demo but not function.
    Code:

    var treeSource =
    {
    localdata: data,
    datatype: 'xml',
    datafields: [
    { name: 'Signature', map: 'simpleSignature' },
    { name: 'Category', map: 'category' }
    ],
    root: "function",
    record:"function",
    id: 'simpleSignature'
    };
    var dataAdapter = new $.jqx.dataAdapter(treeSource);
    dataAdapter.dataBind();
     var records = dataAdapter.getGroupedRecords(['Category'], 'items', 'label',[{ name: 'Signature', map: 'label'}]);
    $('#tree').jqxTree({ source: records, height: '300px', width: '300px', theme: theme });

    The result is this:

    image

    Xml Binding #11516

    marchip
    Member

    Could you help me?????

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

You must be logged in to reply to this topic.