Contains information about updated IDataField
Namespace: Dapfor.Wpf.DataAssembly: Dapfor.Wpf (in Dapfor.Wpf.dll) Version: 4.1.0.26317 (4.1.0.26317)
 Syntax
Syntax
| C# | 
|---|
| public sealed class FieldChangedEventArgs : EventArgs | 
| Visual Basic | 
|---|
| Public NotInheritable Class FieldChangedEventArgs Inherits EventArgs | 
| Visual C++ | 
|---|
| public ref class FieldChangedEventArgs sealed : public EventArgs | 
| F# | 
|---|
| [<SealedAttribute>] type FieldChangedEventArgs = class inherit EventArgs end | 
 Remarks
Remarks
A part of event-driven model. This argument tells GridControl which field is changed:
             
|  Copy | |
|---|---|
| //Some data object public class Product : INotifyPropertyChanged { //Some fields private double price; private DateTime maturity; [DoubleConverter(Precision = 3, ShortForm = true, ShowZero = false)] public double Price { get { return price; } set { price = value; if(PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs("Price")); } } } public DateTime Maturity { get { return maturity; } } public event PropertyChangedEventHandler PropertyChanged; } //Using sample public void AddDataObjectToGrid(GridControl grid) { //Initialize the grid grid.Headers.Add(new Header()); grid.Headers[0].Add(new Column("Price")); grid.Headers[0].Add(new Column("Maturity")); //Add data object to the grid. The object will be implicitly wrapped by the DataObjectAccessor class grid.Rows.Add(new Product()); //Add data object to the grid and wrap it explicitly by the DataObjectAccessor class //(You can provide your custom implementation of the data accessor). grid.Rows.Add(new DataObjectAccessor(new Product())); //Build some hierarchy... grid.Rows[0].Add(new Product()); //Or from another thread - this is safe. ThreadPool.QueueUserWorkItem(delegate { grid.Rows[0].Add(new Product()); }); } | |





