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
1615
Update cell value
posted

When editing data in a grid Is there a way to automatically update value of another cell based on values of the changed cell. 

E.g. We have the editable cells and one cell that displays an average or sum of the other cells. 

  • 23930
    Offline posted

    Hello,

    Did Stephen's suggestion helped you resolve your issue. Let me know if you need any further assistance on this issue.

    Thank you for using Infragistics Components.

  • 40030
    Suggested Answer
    Offline posted

    Hi, 

    So, if you use the dataSource's editingDelegate and hook up the cellExitingEditMode selector. you can ask the grid for the cell that you want to update. If that cell is visible a cell will be returned, otherwise it'll be nil. Assuming it's visible, you can then just update that cell's content. Otherwise, if it's not visible, then you don't have to worry about it, b/c the next time it comes into view, it'll automatically display whatever the underlying data value is. 

    That make sense?

    One other option, if you don't want to be bothered with checking for the cell, you could just call updateGrid, which will invalidate the gridView. 

    -SteveZ