This demo illustrates the support for data binding with an ObservableCollection in GridGroupingControl
Features:
Notifications provided to bounded grid on adding, removing, moving items, refreshing the collection or changing property value since, it implements INotifyCollectionChanged, INotifyPropertyChanged interfaces
Below is the code snippet showing how to create and bind to a collection that derives from the ObservableCollection class.
public class Customer : ObservableCollection{ public Customer() { string connectionString = string.Format(@"Data Source = {0}", FindFile("Northwind.sdf")); northWind = new Northwind(connectionString); var customer = northWind.Customers.Skip(0).Take(100).ToList(); foreach (var o in customer) this.Add(o); } }
The collection that has been created with the class Customer is bound to the Grid Grouping control.
gridGroupingControl1.DataSource = new Customer();
Here is the image of the sample
Interactive Features:
An Event tracer is maintained below the Grid to log the events that are fired at runtime.
You will be able to see the events related to Grouping, Sorting, Filtering in the log window which is generated via the EventTracer