jQWidgets Forums

jQuery UI Widgets Forums General Discussions jqxDataAdapter: what's the field 'record' for?

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 12 years, 4 months ago.

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

  • pit007
    Member

    Hi,

    in jqxDataAdapter, what’s the field ‘record’ for?

    In the Grid’s example with nesting it’s set to ‘Employee’ in one case and ‘Order’ in the other.
    However neither ‘Employee’ nor ‘Order’ seem to be used somewhere else.

    In trying to clone the nesting example I set ‘record’ to another value only to find after hours of trial and error
    that this was the reason no records are displayed in the grid.

    Cheers
    Peter


    Peter Stoev
    Keymaster

    Hi Peter,

    initrowdetails is called when you expand a row/record in jqxGrid. The “record” parameter is the expanded record in jqxGrid.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    pit007
    Member

    Thanks for the quick reply, Peter.

    Unfortunately I don’t get it.
    Where is the reference to ‘record’ or its contents ‘Employee’ or ‘Order’ in initrowdetails?

    Which brings me to two other questions: what is ‘uid’ referring to in the line

    var id = record.uid.toString();

    Also, what’s purpose of

    var filter_or_operator = 1;

    the variable ‘filter_or_operator’ is never used. What’s it for? What is the meaning of ‘1’?

    Many Regards
    Peter


    Peter Stoev
    Keymaster

    Hi Peter,

    The “initrowdetails” is a function called by jqxGrid. It is not related to jqxDataAdapter. The “record” parameter is the expanded record in jqxGrid and contains the record’s data. For example, if you have a column with datafield=”firstName”, the record.firstName will give you the first name. uid is the record’s unique ID i.e the result of the Grid’s “getrowid” method call. To learn more about Data Binding with jqxGrid, read here: jquery-grid-datasources.htm and jquery-data-adapter.htm.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.