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
1590
Complete data is not showing in the grid as it is in the data source
posted

Hi,

I am working with UltraGrid, i have binded a DataTable with the grid. Now if i add some rows in the datatable, grid give random behavior. Some times it shows all the records, but some times it does not show all the data. I am also calling .DataBind() after adding all the rows in the table but still not getting same behavior each time. 

One thing more i m adding rows in the table using a separate thread, and calling .Databind() method by main thread using this.InvokeRequired

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    You cannot add rows to your data source on a separate thread. Neither the grid, the BindingManager in DotNet, nor the DataSet/DataTable are thread safe.

    When you modify data in your data source, it will send notifications which the grid listens for. These happen automatically and there is no way to stop them or marshal them to the UI thread, so this will cause you all sorts of problems.

Children
No Data