[]
        
(Showing Draft Content)

C1.Win.C1FlexGrid.C1FlexGridBase.StartEditing

StartEditing Method

StartEditing(int, int, char)

Puts the grid in edit mode and starts editing a cell.

Declaration
public virtual bool StartEditing(int row, int col, char key)
Parameters
Type Name Description
int row

Row index.

int col

Column index.

char key

Initial character to be sent to the editor.

Returns
Type Description
bool

True if the grid entered edit mode successfully, false otherwise.

StartEditing(int, int, char, Point)

Puts the grid in edit mode and starts editing a cell.

Declaration
public virtual bool StartEditing(int row, int col, char key, Point ptMouse)
Parameters
Type Name Description
int row

Row index.

int col

Column index.

char key

Initial character to be sent to the editor.

Point ptMouse

Mouse position in client coordinates.

Returns
Type Description
bool

True if the grid entered edit mode successfully, false otherwise.

StartEditing(int, int)

Puts the grid in edit mode and starts editing a cell.

Declaration
public bool StartEditing(int row, int col)
Parameters
Type Name Description
int row

Row index.

int col

Column index.

Returns
Type Description
bool

True if the grid entered edit mode successfully, false otherwise.

StartEditing()

Puts the grid in edit mode and starts editing the current cell.

Declaration
public bool StartEditing()
Returns
Type Description
bool

True if the grid entered edit mode successfully, false otherwise.

Remarks

If the AllowEditing property is set to true, the control goes into edit mode automatically when the user presses the edit key (F2), the space bar, or any printable character. You may use the StartEditing(int, int, char) method to force the control into cell-editing mode.

The StartEditing(int, int, char) method forces the control into editing mode even if AllowEditing is set to False. You may also use it to allow editing of fixed cells.

Examples

The code below uses the StartEditing(int, int, char) method to keep the grid in edit mode while the user moves the selection (like the .NET DataGrid control):

void _flex_RowColChange(object sender, System.EventArgs e)
{
  _flex.StartEditing();
}

StartEditing(int, int, char, bool)

Starts editing a cell in response to a key press.

Declaration
protected virtual bool StartEditing(int row, int col, char key, bool force)
Parameters
Type Name Description
int row

Row index.

int col

Column index.

char key

Key that initiated the edit process.

bool force

Whether editing should start even in non-editable cells (e.g. fixed cells).

Returns
Type Description
bool

True if the editing process was started successfully, false otherwise.

Remarks

This method is for internal use. It allows inherited classes to customize the editing process.

StartEditing(int, int, Point, bool)

Starts editing a cell in response to a mouse action.

Declaration
protected virtual bool StartEditing(int row, int col, Point ptMouse, bool dblClick)
Parameters
Type Name Description
int row

Row index.

int col

Column index.

Point ptMouse

Mouse position in client coordinates.

bool dblClick

Whether the action was a double-click.

Returns
Type Description
bool

True if the editing process was started successfully, false otherwise.

Remarks

This method is for internal use. It allows inherited classes to customize the editing process.