C# Class Habanero.ProgrammaticBinding.ControlAdaptors.WinFormsGridBaseAdapter

This is a ControlAdapter for Any Control that Inherits from System.Windows.Forms.Control It wraps this Control behind a standard interface that allows any Control in a Windows Environment to take advantage of the Habanero ControlMappers IControlMapper
Inheritance: WinFormsDataGridViewAdapter, IWinFormsGridBaseAdapter
Afficher le fichier Open project: Chillisoft/habanero.binding

Protected Properties

Свойство Type Description
_gridView System.Windows.Forms.DataGridView

Private Properties

Свойство Type Description
ApproachColor byte
DetermineRequiredColumnWidths void
DistributeAvailableColumnWidths void
DoubleClickHandler void
FireBusinessObjectSelected void
FireCollectionChanged void
FireFilterUpdated void
FireRowDoubleClicked void
GetBusinessObjectCollection IBusinessObjectCollection
GetColumnHeaderRequiredWidths List
ImplementAlternatRowColoring void
SetBusinessObjectCollection void

Méthodes publiques

Méthode Description
ApplyFilter ( IFilterClause filterClause ) : void

Applies a filter clause to the data table and updates the filter. The filter allows you to determine which objects to display using some criteria. This is typically generated by an IFilterControl.

ApplySearch ( IFilterClause searchClause, string orderBy ) : void

Applies a search clause to the underlying collection and reloads the grid. The search allows you to determine which objects to display using some criteria. This is typically generated by the an IFilterControl.

ApplySearch ( string searchClause, string orderBy ) : void

Applies a search clause to the underlying collection and reloads the grid. The search allows you to determine which objects to display using some criteria. This is typically generated by the an IFilterControl.

CheckUserWantsToDelete ( ) : bool

Displays a message box to the user to check if they want to proceed with deleting the selected rows. This method is used as the default method for the CheckUserConfirmsDeletionDelegate. If you want a different message then set this WinFormsGridBaseAdapter.CheckUserConfirmsDeletionDelegate. to a delegate that you would want.

Clear ( ) : void

Clears the business object collection and the rows in the data table

CreateDataSetProvider ( IBusinessObjectCollection col ) : IDataSetProvider
GetBusinessObjectAtRow ( int row ) : IBusinessObject

Returns the business object at the specified row number

GetBusinessObjectRow ( IBusinessObject businessObject ) : IDataGridViewRow

Returns the row for the specified IBusinessObject.

RefreshBusinessObjectRow ( IBusinessObject businessObject ) : void

Refreshes the row values for the specified IBusinessObject.

RefreshGrid ( ) : void

Reloads the grid based on the grid returned by GetBusinessObjectCollection

WinFormsGridBaseAdapter ( System.Windows.Forms.DataGridView gridView ) : System

Méthodes protégées

Méthode Description
ImplementColumnAutoSizingStrategy ( ) : void
MustDelete ( ) : bool

Uses the ConfirmDeletion and CheckUserConfirmsDeletion to determine Whether the SelectedBusinessObject must be deleted or not.

Private Methods

Méthode Description
ApproachColor ( byte fg, byte bg ) : byte
DetermineRequiredColumnWidths ( List requiredWidths, int columnCount ) : void
DistributeAvailableColumnWidths ( List requiredWidths ) : void
DoubleClickHandler ( object sender, EventArgs e ) : void

Handles the event of a double-click

FireBusinessObjectSelected ( ) : void
FireCollectionChanged ( ) : void
FireFilterUpdated ( ) : void

Calls the FilterUpdated() method, passing this instance as the sender

FireRowDoubleClicked ( IBusinessObject selectedBo ) : void

Creates an event for a row being double-clicked

GetBusinessObjectCollection ( ) : IBusinessObjectCollection
GetColumnHeaderRequiredWidths ( ) : List
ImplementAlternatRowColoring ( ) : void
SetBusinessObjectCollection ( IBusinessObjectCollection col ) : void

Method Details

ApplyFilter() public méthode

Applies a filter clause to the data table and updates the filter. The filter allows you to determine which objects to display using some criteria. This is typically generated by an IFilterControl.
public ApplyFilter ( IFilterClause filterClause ) : void
filterClause IFilterClause The filter clause
Résultat void

ApplySearch() public méthode

Applies a search clause to the underlying collection and reloads the grid. The search allows you to determine which objects to display using some criteria. This is typically generated by the an IFilterControl.
public ApplySearch ( IFilterClause searchClause, string orderBy ) : void
searchClause IFilterClause The search clause
orderBy string
Résultat void

ApplySearch() public méthode

Applies a search clause to the underlying collection and reloads the grid. The search allows you to determine which objects to display using some criteria. This is typically generated by the an IFilterControl.
public ApplySearch ( string searchClause, string orderBy ) : void
searchClause string The search clause
orderBy string
Résultat void

CheckUserWantsToDelete() public méthode

Displays a message box to the user to check if they want to proceed with deleting the selected rows. This method is used as the default method for the CheckUserConfirmsDeletionDelegate. If you want a different message then set this WinFormsGridBaseAdapter.CheckUserConfirmsDeletionDelegate. to a delegate that you would want.
public CheckUserWantsToDelete ( ) : bool
Résultat bool

Clear() public méthode

Clears the business object collection and the rows in the data table
public Clear ( ) : void
Résultat void

CreateDataSetProvider() public méthode

public CreateDataSetProvider ( IBusinessObjectCollection col ) : IDataSetProvider
col IBusinessObjectCollection
Résultat IDataSetProvider

GetBusinessObjectAtRow() public méthode

Returns the business object at the specified row number
public GetBusinessObjectAtRow ( int row ) : IBusinessObject
row int The row number in question
Résultat IBusinessObject

GetBusinessObjectRow() public méthode

Returns the row for the specified IBusinessObject.
public GetBusinessObjectRow ( IBusinessObject businessObject ) : IDataGridViewRow
businessObject IBusinessObject The to search for.
Résultat IDataGridViewRow

ImplementColumnAutoSizingStrategy() protected méthode

protected ImplementColumnAutoSizingStrategy ( ) : void
Résultat void

MustDelete() protected méthode

Uses the ConfirmDeletion and CheckUserConfirmsDeletion to determine Whether the SelectedBusinessObject must be deleted or not.
protected MustDelete ( ) : bool
Résultat bool

RefreshBusinessObjectRow() public méthode

Refreshes the row values for the specified IBusinessObject.
public RefreshBusinessObjectRow ( IBusinessObject businessObject ) : void
businessObject IBusinessObject The for which the row must be refreshed.
Résultat void

RefreshGrid() public méthode

Reloads the grid based on the grid returned by GetBusinessObjectCollection
public RefreshGrid ( ) : void
Résultat void

WinFormsGridBaseAdapter() public méthode

public WinFormsGridBaseAdapter ( System.Windows.Forms.DataGridView gridView ) : System
gridView System.Windows.Forms.DataGridView
Résultat System

Property Details

_gridView protected_oe property

protected DataGridView,System.Windows.Forms _gridView
Résultat System.Windows.Forms.DataGridView