Class GridEngineBase
The engine lets you set the main data source for the whole engine. The TableDescriptor will pick up the ItemProperties (schema information) from the data source and the table will be initialized at run-time with records from the list.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid.Grouping
Assembly: Syncfusion.Grid.Grouping.Windows.dll
Syntax
public class GridEngineBase : Engine, ICustomTypeDescriptor, ITableEventsTarget, IComponent, IDisposable
Remarks
TableDescriptor is browsable. You can modify its collections and properties in the designer.
By default, TableDescriptor is auto populated. If you do not modify its settings and later change the data source, it will be automatically reinitialized. If you have made modifications to TableDescriptor and change the SourceList, the modifications will be kept. To discard modifications of a TableDescriptor, you need to explicitly call ResetTableDescriptor.
The table is dependent on information provided by the TableDescriptor and the records from SourceList. It is created on the fly and can not be designed with the designer.
The GridEngineBase class adds design-time support for the engine class. It can be dropped as a component into the component tray of the designer. It can be initialized with a BindingContext so that the CurrencyManager can be kept in sync. You can specify a data source using the DataSource and DataMember properties through the designer.
The engine base class has no dependencies on System.Design and System.Windows.Forms. Only GridEngineBase adds these dependencies.
Constructors
GridEngineBase()
Initializes a new instance of the GridEngineBase class.
Declaration
public GridEngineBase()
Properties
AllowResetSourceListWhenDataSourceChanged
Gets or sets a value indicating whether the engine should immediately reset the SourceListSet and SourceList when you change the Engine.DataSource or not.
Declaration
public bool AllowResetSourceListWhenDataSourceChanged { get; set; }
Property Value
Type |
---|
System.Boolean |
AllowResetTableDescriptorWhenDataSourceSetNull
Gets or sets a value indicating whether the engine should reset the TableDescriptor, Relations and clear out the SourceListSet when you set the Engine.DataSource = null.
Declaration
public bool AllowResetTableDescriptorWhenDataSourceSetNull { get; set; }
Property Value
Type |
---|
System.Boolean |
AllowResolveBindingSource
Gets or sets a value indicating whether the engine is allowed to resolve a BindingSource created by Whidbey design-time to the DataSet it wraps. Only when the engine is allowed to resolve the BindingSource it will be able to properly detected nested relation and foreign-key relations that were setup in the DataSet.
Declaration
public bool AllowResolveBindingSource { get; set; }
Property Value
Type |
---|
System.Boolean |
BindingContext
Gets or sets the BindingContext for the grouping grid.
Declaration
public BindingContext BindingContext { get; set; }
Property Value
Type |
---|
System.Windows.Forms.BindingContext |
Remarks
The BindingContext object of a Control is used to return a single BindingManagerBase object for all data-bound controls contained by the Control. The BindingManagerBase object keeps all controls that are bound to the same data source synchronized. For example, setting the Position property of the BindingManagerBase specifies the item in the underlying list that all data-bound controls point to.
For more information about creating a new BindingContext and assigning it to the BindingContext property, see the BindingContext.
BindToCurrencyManager
Gets or sets a value indicating whether list should be attached to CurrencyManager or not.
Declaration
public bool BindToCurrencyManager { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default value is True. |
Container
Gets the IContainer that contains the Component.
Declaration
public IContainer Container { get; }
Property Value
Type |
---|
System.ComponentModel.IContainer |
Remarks
The IContainer that contains the Component, if any.
This value is a NULL reference (Nothing in Visual Basic) if the Component is not encapsulated in an IContainer.
CurrencyManager
Gets the CurrencyManager for the assigned DataSource and DataMember.
Declaration
public CurrencyManager CurrencyManager { get; }
Property Value
Type |
---|
System.Windows.Forms.CurrencyManager |
DataMember
Gets or sets the specific list in a DataSource for which the control displays the data.
Declaration
public string DataMember { get; set; }
Property Value
Type |
---|
System.String |
DataSource
Gets or sets the data source that the control is displaying data for.
Declaration
public object DataSource { get; set; }
Property Value
Type |
---|
System.Object |
DefaultAllowResetSourceListWhenDataSourceChanged
Gets or sets a value indicating whether the engine should immediately reset the SourceListSet and SourceList when you change the Engine.DataSource or not.
Declaration
public static bool DefaultAllowResetSourceListWhenDataSourceChanged { get; set; }
Property Value
Type |
---|
System.Boolean |
DefaultAllowResetTableDescriptorWhenDataSourceSetNull
Gets or sets a value indicating whether the engine should reset the TableDescriptor and Relations when you set the Engine.DataSource = null.
Declaration
public static bool DefaultAllowResetTableDescriptorWhenDataSourceSetNull { get; set; }
Property Value
Type |
---|
System.Boolean |
DesignMode
Gets a value indicating whether the Component is currently in design mode or not.
Declaration
protected bool DesignMode { get; }
Property Value
Type |
---|
System.Boolean |
InBindingContextChanged
Gets a value indicating whether OnBindingContextChanged() method was called or returned.
Declaration
public bool InBindingContextChanged { get; }
Property Value
Type |
---|
System.Boolean |
InDataMemberChanged
Gets a value that True when OnDataMemberChanged() method was called and False after OnDataMemberChanged returned.
Declaration
public bool InDataMemberChanged { get; }
Property Value
Type |
---|
System.Boolean |
InDataSourceChanged
Gets a value indicating whether OnDataSourceChanged() method was called or returned.
Declaration
public bool InDataSourceChanged { get; }
Property Value
Type |
---|
System.Boolean |
InSetCurrencyManager
Gets a value indicating whether SetCurrencyManager() method was called or returned.
Declaration
public bool InSetCurrencyManager { get; }
Property Value
Type |
---|
System.Boolean |
InSetDataBinding
Gets a value that True when SetDataBinding() method was called and False after SetDataBinding returned.
Declaration
public bool InSetDataBinding { get; }
Property Value
Type |
---|
System.Boolean |
OptimizeIListGroupingPerformance
Gets or sets a value indicating whether the optimized grouping performance is needed for IList data source or not.
Declaration
public bool OptimizeIListGroupingPerformance { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
When this property is set to true, the method OptimizeIListGroupingPeformance need to be invoked explicitly to provide support for real-time updates in grid.
Site
Gets or sets the ISite of the Component.
Declaration
public ISite Site { get; set; }
Property Value
Type |
---|
System.ComponentModel.ISite |
Remarks
The ISite associated with the Component, if any.
This value is a null reference (Nothing in Visual Basic) if the Component is not encapsulated in an IContainer, the Component does not have an ISite associated with it, or the Component is removed from its IContainer.
Methods
Dispose(Boolean)
Overrides and manages the unwanted resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
GetParentCurrencyManager(CurrencyManager)
Gets the parent currency manager for the related currency manager. Used internally.
Declaration
public static CurrencyManager GetParentCurrencyManager(CurrencyManager cm)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.CurrencyManager | cm | An instance of the System.Windows.Forms.CurrencyManager class. |
Returns
Type | Description |
---|---|
System.Windows.Forms.CurrencyManager | The parent CurrencyManager of the current object. |
GetParentCurrenyManager(CurrencyManager)
Gets the parent currency manager for the related currency manager. Used internally.
Declaration
[Obsolete("Use GetParentCurrencyManager method instead")]
public static CurrencyManager GetParentCurrenyManager(CurrencyManager cm)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.CurrencyManager | cm | An instance of the System.Windows.Forms.CurrencyManager class. |
Returns
Type | Description |
---|---|
System.Windows.Forms.CurrencyManager | The parent CurrencyManager of the current object. |
GetService(Type)
Returns an object that represents a service provided by the Component or by its Container.
Declaration
public virtual object GetService(Type service)
Parameters
Type | Name | Description |
---|---|---|
System.Type | service | A service provided by the Component. |
Returns
Type | Description |
---|---|
System.Object | An Object that represents a service provided by the Component. This value is a NULL reference (Nothing in Visual Basic) if the Component does not provide the specified service. |
GetSourceListBase()
This virtual method is called when there has previously been no datasource specified and a GetSourceList() call occurs. Override this method to allow retrieving the source list on demand.
Declaration
protected override IEnumerable GetSourceListBase()
Returns
Type | Description |
---|---|
System.Collections.IEnumerable | The source list for this engine. |
Overrides
InitializeFrom(Engine)
Initializes this object and copies properties from another object.
Declaration
public override void InitializeFrom(Engine source)
Parameters
Type | Name | Description |
---|---|---|
Engine | source | An instance of the Engine class. |
Overrides
OnBindingContextChanged(EventArgs)
Triggered when the BindingContextChanged event is done.
Declaration
protected virtual void OnBindingContextChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An System.EventArgs contains the event data. |
OnDataMemberChanged(EventArgs)
Triggered when the DataMemberChanged event is done.
Declaration
protected virtual void OnDataMemberChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An System.EventArgs contains the event data. |
OnDataSourceChanged(EventArgs)
Triggered when the DataSourceChanged event is done.
Declaration
protected virtual void OnDataSourceChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An System.EventArgs contains the event data. |
OnSourceListChanged(EventArgs)
Overrides and raises the SourceListChanged event is done.
Declaration
protected override void OnSourceListChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An System.EventArgs contains the event data. |
Overrides
Reset()
Overrides and reset the Engine.
Declaration
public override void Reset()
Overrides
ResetAllowResetSourceListWhenDataSourceChanged()
Resets the value of AllowResetSourceListWhenDataSourceChanged property to its default value.
Declaration
public void ResetAllowResetSourceListWhenDataSourceChanged()
ResetAllowResetTableDescriptorWhenDataSourceSetNull()
Resets the value of AllowResetTableDescriptorWhenDataSourceSetNull property to its default value.
Declaration
public void ResetAllowResetTableDescriptorWhenDataSourceSetNull()
SetDataBinding(Object, String)
Sets the DataSource and DataMember properties at run-time.
Declaration
public void SetDataBinding(object dataSource, string dataMember)
Parameters
Type | Name | Description |
---|---|---|
System.Object | dataSource | The data source, typed as System.Object. |
System.String | dataMember | The DataMember string that specifies the table to bind to within the object returned by the DataSource property. |
ShouldReplaceSourceList()
Determines if the source list should be reinitialized the next time GetSourceList() is called.
Declaration
protected override bool ShouldReplaceSourceList()
Returns
Type | Description |
---|---|
System.Boolean | True if the source list should be reinitialized the next time GetSourceList() is called; False if not. |
Overrides
ShouldSerializeAllowResetSourceListWhenDataSourceChanged()
Determines a value indicating whether the value of AllowResetSourceListWhenDataSourceChanged property was modified or not.
Declaration
public bool ShouldSerializeAllowResetSourceListWhenDataSourceChanged()
Returns
Type | Description |
---|---|
System.Boolean | True if it was modified; Otherwise False. |
ShouldSerializeAllowResetTableDescriptorWhenDataSourceSetNull()
Determines a value indicating whether the value of AllowResetTableDescriptorWhenDataSourceSetNull property was modified or not.
Declaration
public bool ShouldSerializeAllowResetTableDescriptorWhenDataSourceSetNull()
Returns
Type | Description |
---|---|
System.Boolean | True if it was modified; Otherwise False. |
Events
BindingContextChanged
Occurs when the BindingContext property is changed.
Declaration
public event EventHandler BindingContextChanged
Event Type
Type |
---|
System.EventHandler |
DataMemberChanged
Occurs when the DataMember property is changed.
Declaration
public event EventHandler DataMemberChanged
Event Type
Type |
---|
System.EventHandler |
DataSourceChanged
Occurs when the DataSource property is changed.
Declaration
public event EventHandler DataSourceChanged
Event Type
Type |
---|
System.EventHandler |