I think you need to create a layer between your data and datagrid.
Suppose your data is of type List <Record> and is currently bound to your DataGrid.
We will need some wrapper class for your data (for one row in this case). This shell modifies the property and launches it regularly. Please note: I wrote this code by heart without any testing, there may (and will) be errors. It is also not thread safe, you need to add some locks when working with the list. But the point must be removed.
public class LazyRecord : INotifyPropertyChanged { private string name; public string Name { get { return name; } set { if (name != value) { name = value; OnPropertyChanged("Name"); } }
After that, just create the <LazyRecord> list from your <Record> list and use this as a data source. Obviously, just using a generic solution that is much more reusable. Hope I helped a bit.
Pz. Dec 30 '10 at 3:28 2010-12-30 03:28
source share