C# Class Habanero.Faces.VWG.EditableGridVWG

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.
The support for some tailored features done in the Win versions is not available here, including customised delete key behaviour and combobox clicking. Potentially, the option of confirming deletion before deleting a row could be implemented in the future.
Inheritance: GridBaseVWG, IEditableGrid
Mostrar archivo Open project: Chillisoft/habanero.faces Class Usage Examples

Public Methods

Method Description
CheckUserWantsToDelete ( ) : bool

Displays a message box to the user to check if they want to proceed with deleting the selected rows.

CreateDataSetProvider ( IBusinessObjectCollection col ) : IDataSetProvider

Creates the appropriate dataSetProvider depending on the grid type e.g. editable grid should return a EditableDataSetProvider and a readonly grid should return a ReadOnlyDataSetProvider

DeleteKeyHandler ( ) : void

Carries out actions when the delete key on the keyboard is pressed. This has been made public purely for testing purposes.

EditableGridVWG ( ) : System

parameterless constructor

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

Method Details

CheckUserWantsToDelete() public method

Displays a message box to the user to check if they want to proceed with deleting the selected rows.
public CheckUserWantsToDelete ( ) : bool
return bool

CreateDataSetProvider() public method

Creates the appropriate dataSetProvider depending on the grid type e.g. editable grid should return a EditableDataSetProvider and a readonly grid should return a ReadOnlyDataSetProvider
public CreateDataSetProvider ( IBusinessObjectCollection col ) : IDataSetProvider
col IBusinessObjectCollection The column that the dataset provider is being created for
return IDataSetProvider

DeleteKeyHandler() public method

Carries out actions when the delete key on the keyboard is pressed. This has been made public purely for testing purposes.
public DeleteKeyHandler ( ) : void
return void

EditableGridVWG() public method

parameterless constructor
public EditableGridVWG ( ) : System
return System

RejectChanges() public method

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

SaveChanges() public method

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