Namespace: Consultingwerk.SmartComponents.Base
Class 
SmartBrowserControl Copy to Clipboard
Parent classes:
Inherits: Infragistics.Win.UltraWinGrid.UltraGrid
Implements: Consultingwerk.SmartComponents.Interfaces.Design.IDesignDataTarget, Consultingwerk.SmartComponents.Interfaces.IAfterRetrieveDataSubscriber, Consultingwerk.SmartComponents.Interfaces.ICheckOkToClose, Consultingwerk.SmartComponents.Interfaces.ISmartDataTarget
Inherited by: Consultingwerk.SmartComponents.Implementation.SmartDataBrowser, Consultingwerk.SmartComponents.Implementation.SmartDynamicBrowser, Consultingwerk.SmartComponents.Implementation.SmartUpdatableBrowser, Consultingwerk.SmartComponents.Implementation.SmartDynamicUpdatableBrowser

File:SmartBrowserControl
Purpose:Base class for the Browsers/Grids in the SmartComponent
Library framework
Description:This class is not intended to be used as an instance on
any screen. There are classes deriving from this class
(SmartDataBrowser) which should be used
Author(s):Marko Rüterbories / Consultingwerk Ltd.
Created:Mon Feb 16 15:26:16 CET 2009



Top Method Summary
Options Name Purpose
# AfterQueryPositionChangedHandler (Object, EventArgs) Activates the current query row (on add and delete)
+ AfterRetrieveDataCallback (ISmartDataSource) Invoked as a callback from DataAdapter, after Data has been retrieve.
+ AttachBindingSource (BindingSource) This Method attaches a new BindingSource given as the Parameter poBindingSource to the Objects of the current Class. The new BindingSource may be created by a DataAdapter or borrowed from a Browser. It is called by the SmartDataAdapter Class when creating a new BindingSource or when a new SmartDataSource is registered to the Class implementing the Interface ISmartDataTarget.
- BeforeRowActivateHandler (Object, RowEventArgs) Event handler for the BeforeRowActivateHandler
# BeginUpdateStateHandler (Object, DataSourceUpdateStateEventArgs) Event handler for the BeginUpdateState event of the data source
# BindingSourceListChangedHandler (Object, ListChangedEventArgs) Handles the ListChanged event of the BindingSource
# CollectFilterValuesHandler (Object, CollectFilterValuesEventArgs) Event handler for the CollectFilterValues event of the ISmartFilterTarget
- CreateVerbs () Dummy method invoked from ICustomTypeDescriptor
# DeleteRecord () This Method is a dispatcher to call DeleteRow inside of the SmartDataSource of the current Class. It is called by the SmartTableIOSources SmartToolbarController or SmartToolStripContainer if the tool to delete a record is pressed and by the SmartDataBrowser if the AfterRowsDeleted Event fires.
# DeregisterBindingSourceEvents () Deregisters events of the BindingSource
# DisableForUpdate (ISmartDataTarget) Disable the Controls during an Update. This Method is called by the SmartDataAdapter by a call to BeginUpdateState () which is defined in the Interface ISmartDataSource.
# DisposedHandler (Object, EventArgs) Event handler for the Disposed event of the SmartBrowserControl
# EnableAfterUpdate () Enable the Controls after an Update. This Method is called by the SmartDataAdapter when setting the SmartDataSourceState Property to Navigatable. Enforced by Interface ISmartDataTarget.
# EndUpdateStateHandler (Object, DataSourceUpdateStateEventArgs) Event handler for the EndUpdateState event of the data source
+ EvaluateTableIOState () Updateable Browsers are not supported by this class but the Method is enforced by the Interface ISmartDataTarget.
- InitializeLayoutHandler (Object, InitializeLayoutEventArgs) Event handler for the InizializeLayout event of the UltraGrid (parent class).
+ LOGICAL IsOkToClose (logical, CloseReason) Check if it is ok to close the parent form.
# OnAfterDeleteRecord (EventArgs) Raises the AfterDeleteRecord event
# OnBeforeDeleteRecord (CancelEventArgs) Raises the BeforeDeleteRecord event
# OnBeginInit () Invoked at the beginning of a Containers InitializeComponents method
# OnEndInit () Invoked at the end of a Containers InitializeComponents method
# OnEnter (EventArgs) Raises the Enter event
# OnHandleCreated (EventArgs) Raises the HandleCreated event
# OnSmartBrowserListChanged (SmartBrowserListChangedEventArgs) Raises the SmartBrowserListChanged
# ParentFormDestroyedHandler (Object, EventArgs) Event handler for the FormDestroyed event of the owning Form
# RegisterBindingSourceEvents () Registers events of the BindingSource

Top Constructor Summary
Options Name Purpose
+ SmartBrowserControl () Constructor for the SmartBrowserControl classs

Top Event Summary
Options Name Purpose
+ AfterDeleteRecord DELEGATE System.EventHandler Event fired when the viewer has successfully deleted a record.
+ BeforeDeleteRecord DELEGATE System.ComponentModel.CancelEventHandler Event fired when the Viewer starts deleting a record. This event is cancellable
+ SmartBrowserListChanged (Object, SmartBrowserListChangedEventArgs) Raised when the ListChanged event of the BindingSource of the SmartBrowserControl is raised

Top Property Summary
Options Name Purpose
+ LOGICAL DeselectRowsOnActivate Propery flags if the currently selected Rows will be deselected before activating a new row. The default is TRUE.
# LOGICAL DesignTime Propery flags if the current instance of the SmartBindingSource is running at design time or runtime.
+ LOGICAL Initializing Indicated that the SmartDataAdapter is currrently being Initialized
+ Consultingwerk.SmartComponents.Interfaces.Design.IDesignDataSource LinkDataSource Represents the SmartDataSource property casted to a .NET Interface
# LOGICAL ParentFormDestroyed Returns if the FormDestroyed evengt of the containing Form has been subscribed
# LOGICAL ParentFormDestroyedSubscribed Returns if the FormDestroyed evengt of the containing Form has been subscribed
+ Consultingwerk.SmartComponents.Interfaces.ISmartDataSource SmartDataSource Get/Set the SmartDataSource of the current Class. The SmartDataSource can be set to any class implementing the Interface ISmartDataSource. This Property is set by the developer when initializing a Control implementing the Interface ISmartDataTarget. Registers the SmartDataBrowser instance with the SmartDataSource (using the RegisterSmartDataTarget method in ISmartDataSource). When the browser is already attached to a BindingSource (in the Form Design), the bindingSource is introduced to the SmartDataSource by assigning it to the BindingSource property.


Method Detail
Top

PROTECTED AfterQueryPositionChangedHandler (Object, EventArgs)

Purpose: Activates the current query row (on add and delete)
Notes: Event handler for the AfterQueryPositionChanged event of the ISmartDataSource

Parameters:
sender System.Object
The reference to object that raised this event
e System.EventArgs
The System.EventArgs with the data for this event
Top

PUBLIC AfterRetrieveDataCallback (ISmartDataSource)

Purpose: Invoked as a callback from DataAdapter, after Data has been retrieve.
Notes: Overridden in SmartDataBrowser to call FormatColumns ()

Parameters:
sender Consultingwerk.SmartComponents.Interfaces.ISmartDataSource
The reference to the ISmartDataSource that invoked this callback
Top

PUBLIC AttachBindingSource (BindingSource)

Purpose: This Method attaches a new BindingSource given as the Parameter
poBindingSource to the Objects of the current Class. The new
BindingSource may be created by a DataAdapter or borrowed from a
Browser.
It is called by the SmartDataAdapter Class when creating a new
BindingSource or when a new SmartDataSource is registered to the
Class implementing the Interface ISmartDataTarget.
Notes: Enforced by Interface ISmartDataTarget.

Parameters:
poBindingSource Progress.Data.BindingSource
The BindingSource to be attached to the Grids DataSource Property.
Top

PRIVATE BeforeRowActivateHandler (Object, RowEventArgs)

Purpose: Event handler for the BeforeRowActivateHandler
Notes: Deselect all rows before a new one is selected.
Event handler for the BeforeRowActivate event of the UltraGrid
(parent class).

Parameters:
sender System.Object
The reference to the object that raised the event
e Infragistics.Win.UltraWinGrid.RowEventArgs
The RowEventArgs with the data for this event
Top

PROTECTED BeginUpdateStateHandler (Object, DataSourceUpdateStateEventArgs)

Purpose: Event handler for the BeginUpdateState event of the data source
Notes:

Parameters:
sender System.Object
The reference to the object that raised this event
e Consultingwerk.SmartComponents.Implementation.DataSourceUpdateStateEventArgs
The DataSourceUpdateStateEventArgs instance with the data for this event
Top

PROTECTED BindingSourceListChangedHandler (Object, ListChangedEventArgs)

Purpose: Handles the ListChanged event of the BindingSource
Notes:

Parameters:
sender System.Object
The reference to the object that raised the ListChanged event
e System.ComponentModel.ListChangedEventArgs
The ListChangedEventArgs with the data for this event
Top

PROTECTED CollectFilterValuesHandler (Object, CollectFilterValuesEventArgs)

Purpose: Event handler for the CollectFilterValues event of the ISmartFilterTarget
Notes:

Parameters:
sender Progress.Lang.Object
The object that raised the CollectFilterValues event
e Consultingwerk.SmartComponents.Implementation.CollectFilterValuesEventArgs
The CollectFilterValuesEventArgs with the data for this event
Top

PRIVATE CreateVerbs ()

Purpose: Dummy method invoked from ICustomTypeDescriptor
Notes: Overridden in the SmartDataBrowser class

Top

PROTECTED DeleteRecord ()

Purpose: This Method is a dispatcher to call DeleteRow inside of the
SmartDataSource of the current Class.
It is called by the SmartTableIOSources SmartToolbarController or
SmartToolStripContainer if the tool to delete a record is pressed
and by the SmartDataBrowser if the AfterRowsDeleted Event fires.
Notes:

Top

PROTECTED DeregisterBindingSourceEvents ()

Purpose: Deregisters events of the BindingSource
Notes:

Top

PROTECTED DisableForUpdate (ISmartDataTarget)

Purpose: Disable the Controls during an Update.
This Method is called by the SmartDataAdapter by a call to
BeginUpdateState () which is defined in the Interface ISmartDataSource.
Notes: Enforced by Interface ISmartDataTarget.

Parameters:
poSmartDataTarget Consultingwerk.SmartComponents.Interfaces.ISmartDataTarget
The ISmartDataTarget instance that is in update mode
Top

PROTECTED DisposedHandler (Object, EventArgs)

Purpose: Event handler for the Disposed event of the SmartBrowserControl
Notes:

Parameters:
sender System.Object
The reference to the object that raised the Disposed event
e System.EventArgs
The System.EventArgs with the data for this event
Top

PROTECTED EnableAfterUpdate ()

Purpose: Enable the Controls after an Update.
This Method is called by the SmartDataAdapter when setting the
SmartDataSourceState Property to Navigatable.
Enforced by Interface ISmartDataTarget.
Notes: Use this only in a Browser!

Top

PROTECTED EndUpdateStateHandler (Object, DataSourceUpdateStateEventArgs)

Purpose: Event handler for the EndUpdateState event of the data source
Notes:

Parameters:
sender System.Object
The object that raised the EndupdateState event
e Consultingwerk.SmartComponents.Implementation.DataSourceUpdateStateEventArgs
The DataSourceUpdateStateEventArgs with the data for this event
Top

PUBLIC EvaluateTableIOState ()

Purpose: Updateable Browsers are not supported by this class but the Method
is enforced by the Interface ISmartDataTarget.
Notes:

Top

PRIVATE InitializeLayoutHandler (Object, InitializeLayoutEventArgs)

Purpose: Event handler for the InizializeLayout event of the UltraGrid (parent
class).
Notes: This Method hides columns where the name starts with _ from Grid and
ColumnChooser. All Bands and Columns are processed.

Parameters:
sender System.Object
The reference to the object that raised the event
e Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs
The InitializeLayoutEventArgs with the data for this event
Top

PUBLIC LOGICAL IsOkToClose (logical, CloseReason)

Purpose: Check if it is ok to close the parent form.
Notes: This class does always return TRUE, as a read-only browser has no
reason to prevent closing the parent form

Parameters:
plShowMessage LOGICAL
When TRUE a message is Shown explaining why it is not ok to close the parent form
poCloseReason System.Windows.Forms.CloseReason
The System.Windows.Forms.CloseReason passed from then OnFormClosing Method of the parent form giving the reason why the form is closed
Returns LOGICAL
Logical value indicating if the parent Form may be closed
Top

PROTECTED OnAfterDeleteRecord (EventArgs)

Purpose: Raises the AfterDeleteRecord event
Notes:

Parameters:
e System.EventArgs
The System.EventArgs with the data for this event
Top

PROTECTED OnBeforeDeleteRecord (CancelEventArgs)

Purpose: Raises the BeforeDeleteRecord event
Notes:

Parameters:
e System.ComponentModel.CancelEventArgs
The CancelEventArgs with the data for this event
Top

PROTECTED OnBeginInit ()

Purpose: Invoked at the beginning of a Containers InitializeComponents
method
Notes: Enforced by System.ComponentModel.ISupportInitialize
http://msdn.microsoft.com/de-de/library/system.componentmodel.isupportinitialize.begininit(VS.80).aspx

Top

PROTECTED OnEndInit ()

Purpose: Invoked at the end of a Containers InitializeComponents method
Notes: Enforced by System.ComponentModel.ISupportInitialize
http://msdn.microsoft.com/de-de/library/system.componentmodel.isupportinitialize.endinit(VS.80).aspx

Top

PROTECTED OnEnter (EventArgs)

Purpose: Raises the Enter event
Notes:

Parameters:
e System.EventArgs
The System.EventArgs with the data for this event
Top

PROTECTED OnHandleCreated (EventArgs)

Purpose: Raises the HandleCreated event
Notes:

Parameters:
e System.EventArgs
The System.EventArgs with the data for this control
Top

PROTECTED OnSmartBrowserListChanged (SmartBrowserListChangedEventArgs)

Purpose: Raises the SmartBrowserListChanged
Notes:

Parameters:
e Consultingwerk.SmartComponents.Base.SmartBrowserListChangedEventArgs
The SmartBrowserListChangedEventArgs with the data for the event
Top

PROTECTED ParentFormDestroyedHandler (Object, EventArgs)

Purpose: Event handler for the FormDestroyed event of the owning Form
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e System.EventArgs
The System.EventArgs with the data for this event
Top

PROTECTED RegisterBindingSourceEvents ()

Purpose: Registers events of the BindingSource
Notes:



Constructor Detail
Top

PUBLIC SmartBrowserControl ()

Purpose: Constructor for the SmartBrowserControl classs
Notes: Subscribes handlers for events.



Event Detail
Top

PUBLIC AfterDeleteRecord DELEGATE System.EventHandler

Purpose: Event fired when the viewer has successfully deleted a record.
Notes: This event is defined using a .NET delegate, so it will show in
the PropertyGrid of the VisualDesigner

Delegate: System.EventHandler
Top

PUBLIC BeforeDeleteRecord DELEGATE System.ComponentModel.CancelEventHandler

Purpose: Event fired when the Viewer starts deleting a record.
This event is cancellable
Notes: This event is defined using a .NET delegate, so it will show in
the PropertyGrid of the VisualDesigner

Delegate: System.ComponentModel.CancelEventHandler
Top

PUBLIC SmartBrowserListChanged (Object, SmartBrowserListChangedEventArgs)

Purpose: Raised when the ListChanged event of the BindingSource of the SmartBrowserControl
is raised
Notes:

Parameters:
sender Progress.Lang.Object
The object that raised the SmartBrowserListChanged event
e Consultingwerk.SmartComponents.Base.SmartBrowserListChangedEventArgs
The SmartBrowserListChangedEventArgs with the data for the event


Property Detail
Top

PUBLIC LOGICAL DeselectRowsOnActivate

Purpose: Propery flags if the currently selected Rows will be deselected
before activating a new row. The default is TRUE.
Notes: See BeforeRowActivateHandler for details

Returns LOGICAL
Top

PROTECTED LOGICAL DesignTime

Purpose: Propery flags if the current instance of the SmartBindingSource
is running at design time or runtime.
Notes: Set during constructor using a check at the
System.ComponentModel.LicenseManager

Returns LOGICAL
Top

PUBLIC LOGICAL Initializing

Purpose: Indicated that the SmartDataAdapter is currrently being
Initialized
Notes:

Returns LOGICAL
Top

PUBLIC Consultingwerk.SmartComponents.Interfaces.Design.IDesignDataSource LinkDataSource

Purpose: Represents the SmartDataSource property casted to a .NET Interface
Notes: Implementation of Interface in Consultingwerk.SmartComponents.dll
SCL-725 - code moved from LinkDataSource.i directly into class file

Returns Consultingwerk.SmartComponents.Interfaces.Design.IDesignDataSource
Top

PROTECTED LOGICAL ParentFormDestroyed

Purpose: Returns if the FormDestroyed evengt of the containing Form has been
subscribed
Notes:

Returns LOGICAL
Top

PROTECTED LOGICAL ParentFormDestroyedSubscribed

Purpose: Returns if the FormDestroyed evengt of the containing Form has been
subscribed
Notes:

Returns LOGICAL
Top

PUBLIC Consultingwerk.SmartComponents.Interfaces.ISmartDataSource SmartDataSource

Purpose: Get/Set the SmartDataSource of the current Class. The SmartDataSource
can be set to any class implementing the Interface ISmartDataSource.
This Property is set by the developer when initializing a Control
implementing the Interface ISmartDataTarget.
Registers the SmartDataBrowser instance with the SmartDataSource
(using the RegisterSmartDataTarget method in ISmartDataSource).
When the browser is already attached to a BindingSource (in the Form
Design), the bindingSource is introduced to the SmartDataSource by
assigning it to the BindingSource property.
Notes: Enforced by Interface ISmartDataTarget.

Returns Consultingwerk.SmartComponents.Interfaces.ISmartDataSource


©2006-2016 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       26.08.2016 08:30:50