jQWidgets Forums

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts

  • Shindou
    Participant

    Thanks for yout answer,but the example is not what I want.

    For example,I received the following XML data:

    <item code="msg">
      <item code="msgCode">
        <item code="encode"></item>
      </item>
    </item>

    Element:<item code=”msg”> is parent of element:<item code=”msgCode”>
    And element:<item code=”msgCode”> is parent of element:<item code=”encode”>

    I want to show this 3-deep-level relation(msg->msgCode->encode),

    because the parent-child relation is obvious(by start tag and end tag),
    so I think it’s not necessary to provide a hierarchy like:

    {
      root: 'Employees',
      record: 'Employee'
    }

    or

    {
        keyDataField: { name: 'EmployeeID' },
        parentDataField: { name: 'ReportsTo' }
    }

    But I still don’t know how to defines the root and record of each hiearchy level in jqxTreeGrid.

    Sorry for my poor English,I find a little similar question at this forum,
    hope it’s useful to make my question clear:
    http://www.jqwidgets.com/community/topic/my-first-treegrid-3-level-deep-xml/

    Thanks again!


    Shindou
    Participant

    Thank you.It works.


    Shindou
    Participant

    I have a idea:

    var records = $("#treeGrid").jqxTreeGrid("getRows");
    
    var dataFileds = new Array();

    and put all treeGrid’s dataFields into dataFileds except “children”,and put “records” into dataFileds

    then use JSON.stringify(records,dataFileds) to get the json I want

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