C# Class Habanero.ProgrammaticBinding.ControlAdaptors.WinFormsEditableGridAdapter

This is a Control Adapter for any DataGridView control. It wraps the DataGridView control behind a standard interface. This allows Faces to interact with it as if it is a Habanero Control.
Inheritance: WinFormsGridBaseAdapter, IWinFormsEditableGridAdapter
Afficher le fichier Open project: Chillisoft/habanero.binding

Méthodes publiques

Méthode Description
CellClickHandler ( object sender, System.Windows.Forms.DataGridViewCellEventArgs e ) : void

Carries out additional actions when a cell is clicked. Specifically, if a combobox cell is clicked, the cell goes into edit mode immediately.

CheckIfComboBoxShouldSetToEditMode ( int columnIndex, int rowIndex ) : bool

Checks whether this is a comboboxcolumn and whether it should begin edit immediately (to circumvent the pain of having to click a cell multiple times to edit the value). This method is typically called by the cell click handler.

This method was extracted from the handler in order to make testing possible, since calling BeginEdit at testing time causes an STA thread error.

DeleteKeyHandler ( ) : void

Carries out actions when the delete key on the keyboard is pressed

RejectChanges ( ) : void

Restore the objects in the grid to their last saved state

SaveChanges ( ) : void

Saves the changes made to the data in the grid

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

Private Methods

Méthode Description
CheckRowEvent ( System.Windows.Forms.DataGridViewRowCancelEventArgs e ) : void
ConfirmRowDeletion ( object sender, System.Windows.Forms.DataGridViewRowCancelEventArgs e ) : void

If deletion is to be confirmed, checks deletion with the user before continuing. This applies only to the default delete behaviour where a full row is selected by clicking on the column.

GetRowObjectIDValue ( System.Windows.Forms.DataGridViewRow row ) : System.Guid
ResetBOCollection ( ) : void

Method Details

CellClickHandler() public méthode

Carries out additional actions when a cell is clicked. Specifically, if a combobox cell is clicked, the cell goes into edit mode immediately.
public CellClickHandler ( object sender, System.Windows.Forms.DataGridViewCellEventArgs e ) : void
sender object
e System.Windows.Forms.DataGridViewCellEventArgs
Résultat void

CheckIfComboBoxShouldSetToEditMode() public méthode

Checks whether this is a comboboxcolumn and whether it should begin edit immediately (to circumvent the pain of having to click a cell multiple times to edit the value). This method is typically called by the cell click handler.
This method was extracted from the handler in order to make testing possible, since calling BeginEdit at testing time causes an STA thread error.
public CheckIfComboBoxShouldSetToEditMode ( int columnIndex, int rowIndex ) : bool
columnIndex int
rowIndex int
Résultat bool

DeleteKeyHandler() public méthode

Carries out actions when the delete key on the keyboard is pressed
public DeleteKeyHandler ( ) : void
Résultat void

RejectChanges() public méthode

Restore the objects in the grid to their last saved state
public RejectChanges ( ) : void
Résultat void

SaveChanges() public méthode

Saves the changes made to the data in the grid
public SaveChanges ( ) : void
Résultat void

WinFormsEditableGridAdapter() public méthode

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