Home Forums WinForms controls Xceed Grid for WinForms Cell value change event (on dataset change)

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #14032 |

    I want to change the color of a cell when it’s value changes due to a change in the underlying dataset. How can this be done ???

    How do I know when the value of a cell has changed (and what cell that is) when the underlying data changes. I know there are events ValueChanging and ValueChanged events, but these are only when manually editing the cells and for a change in the underlying data row (not cell). It would be nice to have an event such as ValueChanging when the underlying data changes.

    I’ve tried various tricks but to no avail – am I missing something obvious …

    Imported from legacy forums. Posted by g.kroger (had 2222 views)

    User (Old forums)
    Member
    Post count: 23064

    The CellRow class has an event <b>CellValueChanged</b> that is called when the underlying data is changed. The disadvantage is: you don’t know which cell has changed, only on which row. Use it like this:<pre>grid.DataRowTemplate.CellValueChanged += new EventHandler(gridCellValueChanged);
    private void gridCellValueChanged(object sender, EventArgs e) {
    Xceed.Grid.DataRow row = sender as Xceed.Grid.DataRow;
    }</pre>

    Imported from legacy forums. Posted by Tommy (had 3230 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.