Home Forums WinForms controls Xceed Grid for WinForms Fast updating of a single databound DataRow

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

    I work in a trading environment and our apps use grids with lots of streaming updates (the grids are bound to DataSets, but no direct connections to the database, no user-provided edits). The updates arrive asynchronously via a messaging layer and are synchronized to the UI thread appropriately.

    When an event arrives, we want to update a single row in a large table, and potentially do other formating stuff as well. For instance, we have handlers listening to DataRowTemplate.Cell.ValueChanged events that change row and cell colors based on various values, etc.

    I notice that this event gets called properly whenever I add a new row to the underling DataTable. However, if I simply update the value an of existing row in the DataTable, it seems like ValueChanged doesn’t get called unless I add the call

    grid.DataSource = myDataSet

    Is this the most efficient/expected way to handle this situation? Is there a specific way I can ask only the affected DataRow to update itself based on the changed Row in the DataTable?

    Here’s a concrete example:

    I have 1000 rows, each showing the number of shares held in a particular stock. A new trade comes in and updates the amount of IBM held in the account from 100 to 200. I update the corresponding row in the DataTable. What should I do to efficiently update just the corresponding DataRow in the grid – i.e. just the row for IBM. Is that how

    grid.DataSource = myDataSet

    is designed to work?

    Imported from legacy forums. Posted by ronnotel (had 2061 views)

    User (Old forums)
    Member
    Post count: 23064

    Solved – I think:

    Further research on this board led me to try subscribing to the event

    DataRowTemplate.CellValueChanged

    This seems to work as expected, but is poorly documented for such an important use case.

    Imported from legacy forums. Posted by ronnotel (had 3029 views)

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