C# 클래스 Habanero.Faces.Win.EditableGridWin

Provides a grid on which the user can edit data and add new business objects directly.
IMPORTANT: This grid does not provide any buttons or menus for users to save the changes they have made, and all changes will be lost if the form is closed and changes are not saved programmatically. Either carry out a dirty check when the parent form is closed and take appropriate save action using SaveChanges(), or use an IEditableGridControl, which provides Save and Cancel buttons.
상속: GridBaseWin, IEditableGrid
파일 보기 프로젝트 열기: Chillisoft/habanero.faces 1 사용 예제들

공개 메소드들

메소드 설명
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.

CreateDataSetProvider ( IBusinessObjectCollection col ) : IDataSetProvider

Creates a dataset provider that is applicable to this grid. For example, a readonly grid would return a read only datasetprovider, while an editable grid would return an editable one.

DeleteKeyHandler ( ) : void

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

EditableGridWin ( ) : System

Constructs the EditableGridWin

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

보호된 메소드들

메소드 설명
ProcessDataGridViewKey ( KeyEventArgs e ) : bool

A Microsoft-suggested override to catch key presses, since KeyPress does not work correctly on DataGridView

ProcessDialogKey ( Keys keyData ) : bool

A Microsoft-suggested override to catch key presses, since KeyPress does not work correctly on DataGridView

비공개 메소드들

메소드 설명
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

메소드 상세

CellClickHandler() 공개 메소드

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
리턴 void

CheckIfComboBoxShouldSetToEditMode() 공개 메소드

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
리턴 bool

CreateDataSetProvider() 공개 메소드

Creates a dataset provider that is applicable to this grid. For example, a readonly grid would return a read only datasetprovider, while an editable grid would return an editable one.
public CreateDataSetProvider ( IBusinessObjectCollection col ) : IDataSetProvider
col IBusinessObjectCollection The collection to create the datasetprovider for
리턴 IDataSetProvider

DeleteKeyHandler() 공개 메소드

Carries out actions when the delete key on the keyboard is pressed
public DeleteKeyHandler ( ) : void
리턴 void

EditableGridWin() 공개 메소드

Constructs the EditableGridWin
public EditableGridWin ( ) : System
리턴 System

ProcessDataGridViewKey() 보호된 메소드

A Microsoft-suggested override to catch key presses, since KeyPress does not work correctly on DataGridView
protected ProcessDataGridViewKey ( KeyEventArgs e ) : bool
e System.Windows.Forms.KeyEventArgs
리턴 bool

ProcessDialogKey() 보호된 메소드

A Microsoft-suggested override to catch key presses, since KeyPress does not work correctly on DataGridView
protected ProcessDialogKey ( Keys keyData ) : bool
keyData Keys
리턴 bool

RejectChanges() 공개 메소드

Restore the objects in the grid to their last saved state
public RejectChanges ( ) : void
리턴 void

SaveChanges() 공개 메소드

Saves the changes made to the data in the grid
public SaveChanges ( ) : void
리턴 void