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
255
Client side Event AfterCellUpdateHandler Set a cell value
posted

I am working with an UltrawebGrid and what I want to do is set the value of a cell.  I am taking values from the grid performing a calculation.  Based on if that calculation equals what they entered into that cell I want the user to have the ability to choose what value ends up in that column.  If they are the same nothing happens.  If they are different a confirm message box pops up if they click ok I want to set the cell value to the calculated variable. If they choose cancel set the cell to the entered value, which really nothing needs to happen.  Everything is working for me except when I go to set the cell value.  cell.set(cellId, calcValue); returns as undefined and I am not sure what I am doing wrong.  I attached my JavaScript in a text file for anyone who needs to see.

 

Parents
No Data
Reply
  • 49378
    posted

    Hi Dylan,

    It has been a while since your post, however in case you are still in need of assistance I will be glad to help.

    I have created a sample for you, which demostrates how a cell value can be set in the AfterCellUpdate handler. The sample uses the Northwind database and upon a cell edit, sets the value of the last cell in the row.

    For clarity, here is the javascript function:

    function UltraWebGrid1_AfterCellUpdateHandler(gridName, cellId){
        //This handler will set the value of the last cell in the row.
        igtbl_getCellById(cellId).Row.getCell(2).setValue("This is a test value");


    }

    You may find the following article from our knowledge base helpful:

    http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.Aspx?ArticleID=2878

    Please contact me if you have any questions.

    Petar Ivanov
    Developer Support Engineer
    Infragistics, Inc.
    http://www.infragistics.com/support

Children
No Data