DataGrid Update Flicker

  • Thread starter Thread starter Joe Hanna
  • Start date Start date
J

Joe Hanna

Apologies if this has done the rounds. I have already checked Google but couldn't find an answer.

I am binding a DataGrid to a custom Collection (effectively an ArrayList). The DataGrid needs to have the DataSource member set to Nothing and then reassigned to the Collection to reflect any changes in the Collection. I also use the Select Method to highlight the modified/newly added row. This causes some untidy screen flicker.

Is there a DataGrid equivalent to the ListView.BeginUpdate/EndUpdate Methods or some other trick to produce a similar result?

Thanks in advance
Joe
 
There are no such methods for data grid. For datagrid that bind to a changeable datasource, the data source should implement the IBindingList interface. This way the grid will get notified when the data has changed and updates only the changed row. I suggest that you derive your own class from ArrayList - a one that implements IBindingList
Apologies if this has done the rounds. I have already checked Google but couldn't find an answer.

I am binding a DataGrid to a custom Collection (effectively an ArrayList). The DataGrid needs to have the DataSource member set to Nothing and then reassigned to the Collection to reflect any changes in the Collection. I also use the Select Method to highlight the modified/newly added row. This causes some untidy screen flicker.

Is there a DataGrid equivalent to the ListView.BeginUpdate/EndUpdate Methods or some other trick to produce a similar result?

Thanks in advance
Joe
 
Thanks Alex.
There are no such methods for data grid. For datagrid that bind to a changeable datasource, the data source should implement the IBindingList interface. This way the grid will get notified when the data has changed and updates only the changed row. I suggest that you derive your own class from ArrayList - a one that implements IBindingList
Apologies if this has done the rounds. I have already checked Google but couldn't find an answer.

I am binding a DataGrid to a custom Collection (effectively an ArrayList). The DataGrid needs to have the DataSource member set to Nothing and then reassigned to the Collection to reflect any changes in the Collection. I also use the Select Method to highlight the modified/newly added row. This causes some untidy screen flicker.

Is there a DataGrid equivalent to the ListView.BeginUpdate/EndUpdate Methods or some other trick to produce a similar result?

Thanks in advance
Joe
 
Back
Top