jQWidgets Forums

jQuery UI Widgets Forums Grid Color a row on updating

This topic contains 4 replies, has 2 voices, and was last updated by  andre84 10 years, 8 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Color a row on updating #61390

    andre84
    Participant

    Hello,
    I want to color a row when it was updating.
    How can I do this?

    Thanks for your answer.

    André

    Color a row on updating #61398

    Peter Stoev
    Keymaster

    Hi Andre,

    I think that you may look at: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/editrowsrendering.htm?arctic for solution.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Color a row on updating #61437

    andre84
    Participant

    In your sample the grid have editable mode. In my way, I’m not in this case.
    I use $(“#jqxgrid”).jqxGrid(‘updaterow’, rowIDs, newRows);.
    When the row is updated, it doesn’t pass in cellclass

    source ={
    updaterow: function (rowid, rowdata, commit) {
    // that function is called after each edit.
    alert(“toto”);
    // synchronize with the server – send update command
    // call commit with parameter true if the synchronization with the server is successful
    // and with parameter false if the synchronization failder.
    var rowindex = $(“#” + that._id).jqxGrid(‘getrowboundindexbyid’, rowid);
    that._oaEditedRowsId.push(rowindex);
    commit(true);
    }
    },

    var cellclass = function (row, datafield, value, rowdata) {
    for (var i = 0; i < editedRows.length; i++) {
    if (editedRows[i].index == row) {
    return “editedRow”;
    }
    }
    }

    Color a row on updating #61442

    Peter Stoev
    Keymaster

    The demo which I sent you shows how to conditionally render Grid rows. When you update a row, the cellclass function is called. Depending on some custom conditions you can decide what cell class to return.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Color a row on updating #61449

    andre84
    Participant

    Thanks, it’s work !! I do an error on my condition.

    Best Regards,

    André

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

You must be logged in to reply to this topic.