jQWidgets Forums

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Unique Id problem while sorting Unique Id problem while sorting #87628

    josephjmarini
    Participant

    I just discover uid in the row object.
    However it does not get updated to the new row position.
    This appears to be the original row position when an objects is added to the table.
    So my original questions:
    How does one get the new row indexes for a table after it has been sorted?
    Do I need to do some type of refresh on the table after a sort to update the indexes/uids?

    in reply to: Unique Id problem while sorting Unique Id problem while sorting #87625

    josephjmarini
    Participant

    I have the same problem.
    How does one get the new row indexes.
    I assumed that table.getRows() would return the current new row indexes after a sort
    I then iterate over the array in a loop and using the loop counter this is the new index.
    I get a task object from the manager and set the new table row index for this object.
    This all works fine until I turn on sorting on the table.
    var rows = this._dragonFlyJQXTableTasks.getRows();
    for (var i = 0, size = rows.length; i < size; i++) {
    // get a row.
    rowData = rows[i];
    task = TaskManager.getInstance().findTaskWithId(rowData.id);
    if (task !== null && task !== undefined) {
    task.setTableRowIndex(i);
    }
    }

    My question:
    How does one get the new row indexes for a table after it has been sorted?
    Do I need to do some type of refresh on the table after a sort to update the indexes?


    josephjmarini
    Participant

    I solved this issue.
    In the raper class I had to create the function and then call the passed in function.
    Not sure why I needed to do this. Again I am still learning javascript.

    DragonflyJQXTree.prototype._registerOnClickHandlerContextMenu = function(contextMenuId, functionHandler) {
    $(contextMenuId).on(‘itemclick’, function (event) {
    functionHandler(event);
    });
    };


    josephjmarini
    Participant

    So what you are saying is that one could use the value field as a reference to some custom mapping or as a user object.
    However I assume that I could also retrieve the standard attributes of a node as listed above.

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