jQuery UI Widgets Forums Grid getrowdata of sorted grid returns original item instead of sorted

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

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

  • agrocks
    Member

    I’m using $(“#jqxdimensions”).jqxGrid(‘getrowdata’, row); to retrieve row data on `cellendedit` event. But eventually it returns “original” item.

    items = ["C","A","B","D"];
    var a = $("#jqxgrid").jqxGrid('getrowdata', 0); // a == "C"
    //Sort. Grid displays "A","B","C","D"
    a = $("#jqxgrid").jqxGrid('getrowdata', 0); // a == "C"

    Code snippet:

    var column = args.datafield;
    var row = args.rowindex;
    var value = args.value;
    var oldvalue = args.oldvalue;
    // Selected value was modified
    if (column == 'Selected' && row > -1) {
    if (value == true && oldvalue == false) {
    var item = $("#jqxgrid").jqxGrid('getrowdata', row);
    ...

    Am I doing something wrong?


    Peter Stoev
    Keymaster

    Hi agrocks,

    The ‘getrowdata’ works with bound indexes and you’re passing a visible index. If you want to work with visible indexes, use the ‘getrenderedrowdata’ method.

    var data = $("#jqxgrid").jqxGrid('getrenderedrowdata', 0);

    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.