DataGridView BindingSource Ghost Rows (Wisej 2.2.43)

0
0

Hi all.

We are experiencing some issues on the update of a DataGridView.

We have a static ObservableColletion in memory shared by all session. When a DGV need to be populated, we created a copy from the shared collection and set it to a BindingSource. The BindingSource is set to the DGV.

When the shared ObservableCollection change from any client we also update the respective local collection related to BindingSource to keep all alligned.

In this way we can:

  • Push only the changed rows to grid, not the all the data source
  • Keep every grids of every clients with own BindingSource and own sorting
  • We used the method DataGridView1_DataUpdated method to set the style of the rows, only for a limited range of rows (we noted a very strong performance improvement, before we are using  DataGridView1_DataBindingComplete)

The problem is that random adding rows, we have some ghost rows at the end of the grid.

Any suggestions ?

Attached an image and a sample.

Thanks!

 

 

  • You must to post comments
0
0

Hi Alaa,

thank you for the answer.

 

So do you plan to include the fix in the next release ?

When you say ” this makes the client request the data page.”, you mean that not all the data source is send to the client ? Because we noted that is always send all the data source.

 

Thanks for the support.

  • You must to post comments
0
0

Hi Simone,

This is a confirmed bug and it is fixed internally,

However there’s a simple workaround for this issue as follows:

this.dataGrid1.BeginUpdate();

//… do the updates …

this.dataGrid1.EndUpdate(); // <– this makes the client request the data page.

Best regards,
Alaa

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.