jQWidgets Forums

jQuery UI Widgets Forums TreeGrid not coherent data return when selecting row

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 9 years, 9 months ago.

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

  • foulques.nera
    Participant

    I,
    My simple TreeGrid is filled with data from json source.
    Some fields of json records are array of integer. So I don’t describe the type of this field :

    source :  { ....
    dataFields: [ ...
    { name: 'writers'},...

    On some rows, when I clic on it, the field is recognized as ‘Number’ (view in Chrome debugger).
    On Some other rows, the field is ‘Array[1]’ (view in Chrome debugger).
    To correct the problem, I replace the following code:

    $('#documentList').on('rowClick', function (event) {
    var args = event.args;
    _documentSelected = args.row;

    by code :

    $('#documentList').on('rowClick', function (event) {
    var dataAdapter = $("#documentList").jqxTreeGrid( 'source');
    var args = event.args;
    var record = dataAdapter.loadedData[args.boundIndex];
    _documentSelected = record;

    What is the problem ?

    Except standard type as ‘string’, ‘number’ and ‘date’, is there a way to describe fields as array or sub-json-document ?

    Best regards.


    Peter Stoev
    Keymaster

    Hi foulques.nera,

    The first problem is that you use internal API like dataAdapter.loadedData. We do not support it. The supported data types are “date”, “string” ,”number” and “bool”.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.