jQWidgets Forums

Forum Replies Created

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

  • areel
    Participant

    Feels like a monologue …..

    I have found out that if you do NOT define the datafields within your source definition, then the details property comes through as an Array rather then a string.

    Is this the expected behaviour?


    areel
    Participant

    Hi

    I have been using this

    http://www.jqwidgets.com/community/topic/related-to-parent-child-jqxgrid/

    as my sample and modified it. Since the initrowdetails function has the following signature:
    function (index, parentElement, gridElement, record)

    I thought a reasonable approach would be to access the details via the record passed in so I added that property to
    source.datafields.

    var source = { localdata: $scope.data,
    datafields: [ { name: ‘id’, type: ‘string’ }, ….. { name: ‘details’, type: ‘array’}], ….. }

    var dataAdapter = new $.jqx.dataAdapter(source, {
    loadComplete: function (data) { },
    loadError: function (xhr, status, error) { }
    });

    However the record parameter in initrowdetails contains the detail property but it’s value is a string,

    details: “[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]”

    rather then an array.

    So question becomes how can I pass the details array from the parent row into the initrowdetails function.

    Regards

    Aidan

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