jQuery UI Widgets Forums Grid GetRows with filters and sorts

This topic contains 1 reply, has 2 voices, and was last updated by  ivailo 8 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • GetRows with filters and sorts #81993

    Salim Hamza
    Participant

    Howdy,

    I am using this to get the row index of a cell in order to modify its content

    var rows = $('#jqxgrid').jqxGrid('getrows');
    for (var i = 0; i < rows.length; i++) {
                if(rows[i].PLW_Project==currentPLW_Project) {
                  $("#jqxgrid").jqxGrid('setcellvalue', i, currentDatafield, date);
                }
    }

    My big issue is that getrows return shown row
    Filters and Sorting affects what getrows returns
    setcellvalue recieves an index parameter that is related to the initial size and order of the source data
    both indexes do not represent the same rows
    it means that source code starts modifying wrong rows if I filter or sort my rows

    I tried to use records instead
    $("#jqxgrid").jqxGrid("rows").records;
    but that method only return 100 rows at first (I got 700+ rows)
    you need to scroll down in order to update the rows.records
    the issue with that is if you filter your grid and the 101 row ends up 5th.
    It’s still not in the rows.records as it only contains 100 rows and you can’t scroll down to update it

    is there a method that return all row data from the source with no limit?

    Best Regards
    -Salim Hamza

    GetRows with filters and sorts #82009

    ivailo
    Participant

    Hi Salim,

    getrows returns all the data.
    You can use setcellvaluebyid instead setcellvalue in your case.

    Best Regards,
    Ivailo Ivanov

    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.