jQuery UI Widgets Forums DataTable hierarchical data as source issue

This topic contains 2 replies, has 2 voices, and was last updated by  jahnvi25 9 years, 4 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • hierarchical data as source issue #72960

    jahnvi25
    Participant

    i have data coming from server in following format
    data = {col1:’data1′,col2:’data2′,children:[{col1:’data11′,col2:’data12′}]};

    my datafields are define as
    var src = datatype: “json”,
    datafields: [
    {name:’col1′, type:’string’},
    {name:’col2′,type:’string’}
    ]};
    when i set the data using src.localdata = data
    in table it shows children data data11 and data12 is col1 and col2.. what i would expect that it should show data1 in col1… since that was the match.

    i am using row details and in that i am using children to show up.. but it shows de default and it avoids the parent data..

    how can i reslove that. i am using jqx datatable

    Thanks

    hierarchical data as source issue #72980

    Dimitar
    Participant

    Hello jahnvi25,

    To fix this, make data an array:

    var data = [{
        col1: 'data1',
        col2: 'data2',
        children: [{
            col1: 'data11',
            col2: 'data12'
        }]
    }];

    Best Regards,
    Dimitar

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

    hierarchical data as source issue #73023

    jahnvi25
    Participant

    thanks for response.. its working fine..

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

You must be logged in to reply to this topic.