Namespace: Consultingwerk.SmartComponents.Implementation
Class 
SmartRadDataBrowser Copy to Clipboard
Parent classes:
Inherits: Telerik.WinControls.UI.RadGridView
Implements: Consultingwerk.SmartComponents.Interfaces.Design.IDesignDataTarget, Consultingwerk.SmartComponents.Interfaces.IAfterRetrieveDataSubscriber, Consultingwerk.SmartComponents.Interfaces.ICheckOkToClose, Consultingwerk.SmartComponents.Interfaces.ISmartDataBrowser, Consultingwerk.SmartComponents.Interfaces.ISmartDataTarget, Consultingwerk.SmartComponents.Interfaces.ISmartDataTargetWithBindingSource

File:SmartRadDataBrowser
Purpose:SmartDataBrowser implementation based on the Telerik
RadDataView Control
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Sun May 31 17:37:44 CEST 2015
/* DEFINE VARIABLE oBindingSource AS Progress.Data.BindingSource NO-UNDO .



Top Method Summary
Options Name Purpose
+ ActivateCurrentRow () Activates the current grid row during Update/Delete/Copy in a Viewer
# AfterBatchAvailableHandler (Object, EventArgs) Event handler for the AfterBatchAvailable event of the SmartDataSource
+ 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.
+ BeginInit () Invoked at the beginning of a Containers InitializeComponents method
# 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
# 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.
# 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.
+ EndInit () Invoked at the end of a Containers InitializeComponents method
# EndUpdateStateHandler (Object, DataSourceUpdateStateEventArgs) Event handler for the EndUpdateState event of the data source
+ EvaluateTableIOState () Updatable Browsers are not supported by this class but the Method is enforced by the Interface ISmartDataTarget.
+ LOGICAL IsOkToClose (logical, CloseReason) Check if it is ok to close the parent form.
# OnSmartBrowserListChanged (SmartBrowserListChangedEventArgs) Raises the SmartBrowserListChanged
# OnSortChanged (Object, GridViewCollectionChangedEventArgs) Raises the OnSortChanged event
# OpenChildDataSources () Opens the queries for the registered child data sources
# RegisterBindingSourceEvents () Registers events of the BindingSource
+ RegisterChildDataBinding (BindingSource, character) Registers the binding source for a child template of the RadGridView
+ ResumeRowSynchronizationAfterReposition () Resume row synchronization
+ ScrollToCurrentRow (logical) Scrolls to the BindingSource's position
+ ScrollToCurrentRow (logical, logical) Scrolls to the BindingSource's position
+ ScrollToFirstRow () Scrolls the Grid to the First Row
+ ScrollToLastRow () Scrolls the Grid to the Last Row
+ SuspendRowSynchronizationForReposition () Suspends row synchronization
+ UpdateSortIndicator (character) Updates the Sort Indicators of the SmartDataBrowser columns

Top Constructor Summary
Options Name Purpose
+ SmartRadDataBrowser () Constructor for the SmartRadDataBrowser class

Top Event Summary
Options Name Purpose
+ SmartBrowserListChanged (Object, SmartBrowserListChangedEventArgs) Raised when the ListChanged event of the BindingSource of the SmartBrowserControl is raised

Top Property Summary
Options Name Purpose
+ Progress.Data.BindingSource BindingSource
# LOGICAL DesignTime
+ LOGICAL Initializing
+ Consultingwerk.SmartComponents.Interfaces.Design.IDesignDataSource LinkDataSource
+ Consultingwerk.SmartComponents.Interfaces.ISmartDataSource SmartDataSource


Method Detail
Top

PUBLIC ActivateCurrentRow ()

Purpose: Activates the current grid row during Update/Delete/Copy in a Viewer
Notes:

Top

PROTECTED AfterBatchAvailableHandler (Object, EventArgs)

Purpose: Event handler for the AfterBatchAvailable event of the SmartDataSource
Notes: Only subscribed in case of SmartBusinessEntityAdapter

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

PUBLIC AfterRetrieveDataCallback (ISmartDataSource)

Purpose: Invoked as a callback from DataAdapter, after Data has been retrieve.
Notes:

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

PUBLIC BeginInit ()

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 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

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 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

PUBLIC EndInit ()

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 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: Updatable Browsers are not supported by this class but the Method
is enforced by the Interface ISmartDataTarget.
Notes:

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 OnSmartBrowserListChanged (SmartBrowserListChangedEventArgs)

Purpose: Raises the SmartBrowserListChanged
Notes:

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

PROTECTED OnSortChanged (Object, GridViewCollectionChangedEventArgs)

Purpose: Raises the OnSortChanged event
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e Telerik.WinControls.UI.GridViewCollectionChangedEventArgs
The GridViewCollectionChangingEventArgs with the data for this event
Top

PROTECTED OpenChildDataSources ()

Purpose: Opens the queries for the registered child data sources
Notes: Also creates the query and assigns them to the BindingSource handles
on first invocation

Top

PROTECTED RegisterBindingSourceEvents ()

Purpose: Registers events of the BindingSource
Notes:

Top

PUBLIC RegisterChildDataBinding (BindingSource, character)

Purpose: Registers the binding source for a child template of the
RadGridView
Notes:

Parameters:
poBindingSource Progress.Data.BindingSource
The Progress.Data.BindingSource used in the template definition of the child bands
pcBufferNames CHARACTER
The names of the buffers from the LinkDataSource to use in binding query
Top

PUBLIC ResumeRowSynchronizationAfterReposition ()

Purpose: Resume row synchronization
Notes: SuspendRowSynchronization and ResumeRowSynchronization methods can
be used to temporarily suspend UltraGrid from responding to data
source change notifications. When row synchronization is suspended,
the UltraGrid will still mark the rows dirty so it will re-create
the rows next time it gets painted.

Top

PUBLIC ScrollToCurrentRow (logical)

Purpose: Scrolls to the BindingSource's position
Notes:

Parameters:
plAllRegions LOGICAL
Logical value indicating if all RowScrollRegions will be positioned to the current row of just the first one.
Top

PUBLIC ScrollToCurrentRow (logical, logical)

Purpose: Scrolls to the BindingSource's position
Notes:

Parameters:
plAllRegions LOGICAL
Logical value indicating if all RowScrollRegions will be positioned to the current row of just the first one.
plEnforceScroll LOGICAL
Logical set to false to indicate that we should only scroll when the row would otherwise not be visible, FALSE is the ABL Browse widget's SET-REPOSITIONED-ROW CONDITIONAL behavior
Top

PUBLIC ScrollToFirstRow ()

Purpose: Scrolls the Grid to the First Row
Notes:

Top

PUBLIC ScrollToLastRow ()

Purpose: Scrolls the Grid to the Last Row
Notes:

Top

PUBLIC SuspendRowSynchronizationForReposition ()

Purpose: Suspends row synchronization
Notes: SuspendRowSynchronization and ResumeRowSynchronization methods can
be used to temporarily suspend UltraGrid from responding to data
source change notifications. When row synchronization is suspended,
the UltraGrid will still mark the rows dirty so it will re-create
the rows next time it gets painted.

Top

PUBLIC UpdateSortIndicator (character)

Purpose: Updates the Sort Indicators of the SmartDataBrowser columns
Notes: Typically invoked from a SmartDataAdapter after setting the QuerySort
property. Does not call back into QuerySort

Parameters:
pcQuerySort CHARACTER
The QuerySort to visualize


Constructor Detail
Top

PUBLIC SmartRadDataBrowser ()

Purpose: Constructor for the SmartRadDataBrowser class
Notes: Subscribes handlers for events.



Event Detail
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 Progress.Data.BindingSource BindingSource


Returns Progress.Data.BindingSource
Top

PROTECTED LOGICAL DesignTime


Returns LOGICAL
Top

PUBLIC LOGICAL Initializing


Returns LOGICAL
Top

PUBLIC Consultingwerk.SmartComponents.Interfaces.Design.IDesignDataSource LinkDataSource


Returns Consultingwerk.SmartComponents.Interfaces.Design.IDesignDataSource
Top

PUBLIC Consultingwerk.SmartComponents.Interfaces.ISmartDataSource SmartDataSource


Returns Consultingwerk.SmartComponents.Interfaces.ISmartDataSource


©2006-2023 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       08.12.2024 13:02:16