Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1060
Force UpdateRow on each UpdateCell when using Ajax
posted

Hi - I'm using 2009.1 Netadvantage and I'd like to Ajax enable my grid, but I need to handle the UpdateCell as soon as each cell is changed.

When I set the Browser="XML" then the UpdateCell only fires when you move off the row.  Is there a way to make it fire back each time the cell is changed by the user?  I need to allow them to enter a value in one cell, have that fire a server side event that then looks ups various things in the data base and fills in a number of other cells on that row in the grid.

Any suggestions much appreciated?

cheers

Jonathan

Parents
  • 45049
    Verified Answer
    posted

    Jonathan,

    Using JavaScript, you can use the client-side AfterCellUpdateHandler, get a reference to the cell that was updated, get a reference to its row, and call processUpdateRow() on that row object.  You can then use the UpdateRow event to process that a change was made.

    I don't have a sample available to illustrate this, and I don't immediately have a development environment available.  Below is some JavaScript code which I believe will achieve the result you're after:

    function ultraWebGrid1_AfterCellUpdateHandler(gridName,cellId)
    {
        var cell = igtbl_getCellById(cellId);
        var row = cell.Row;
        row.processUpdateRow();
    }

Reply Children