Skip to main content

Add multiple rows simultaneously

Comments

3 comments

  • Dapfor Team

    Hi,

    Yes, you can. All operations in this collection are safe except the iteration. The grid iterates this collection only once when the Grid.DataSource property is called. If you add/remove new data, the grid gets the modified item without iteration.

    The ThreadSafeBindingList doesn't have methods to add objects in batches. How many objects you want to add? As an idea to accelerate the process you can firstly populate the collection and then bind it to the grid.

    Best regards,

    Dapfor

     

    0
  • Michael Sage
    We have an application that displays trades as they come in. At times there can be several trades which come in the same instant. Existing trades/rows get pushed down when new trades come in. Currently what happens is when a bunch of trades come in, the existing row gets pushed down once for each new trade. We would like to batch update the grid so the existing row only draws once when there is a batch as opposed to once for each new trade. What would be the best method to achieve this. The reason for this conversation was we do some spikes in CPU when we get a burst of new rows added.

    Thanks
    0
  • Dapfor Team

    Hi,

    You can use Grid.BeginUpdate() / Grid.EndUpdate() methods to prevent from the vertical scrolling between these calls. In this case the grid will redraw its surface only when the Grid.EndUpdate() method is called.

    Best regards,

    Dapfor

     

     

    0

Please sign in to leave a comment.

Powered by Zendesk