Professional User Interface Suite, Copyright FOSS Software Inc. Help Published with Permission.
class CExtGridWnd : public CExtGridBaseWnd,
public CExtGridDataProvider::IDataProviderEvents

Remarks

The CExtGridWnd class implements a universal grid window. It uses a CExtGridDataProvider-based object to store data cells which in turn are instances of a CExtGridCell-based class.

Header

ExtGridWnd.h

Constants

The CExtGridWnd class is derived from CExtScrollItemWnd. It uses all basic and extended scrolling window styles provided with CExtScrollItemWnd::SiwGetStyle(), CExtScrollItemWnd::SiwGetStyleEx(), CExtScrollItemWnd::SiwModifyStyle(), and CExtScrollItemWnd::SiwModifyStyleEx() methods and defines an additional extended style:

Value Meaning
__EGWS_EX_EXTERNAL_DATA The data provider object is used to obtain the number of rows and columns.

Below are listed additional basic styles (used in the CExtGridWnd::BseGetStyle() and CExtGridWnd::BseModifyStyle() methods):

Value Meaning
__EGWS_BSE_EDIT_CELLS_OUTER_T Editing of top outer cells is enabled.
__EGWS_BSE_EDIT_CELLS_OUTER_B Editing of bottom outer cells is enabled.
__EGWS_BSE_EDIT_CELLS_OUTER_HORZ Editing of top and bottom outer cells is enabled.
__EGWS_BSE_EDIT_CELLS_OUTER_L Editing of left outer cells is enabled.
__EGWS_BSE_EDIT_CELLS_OUTER_R Editing of right outer cells is enabled.
__EGWS_BSE_EDIT_CELLS_OUTER_VERT Editing of left and right outer cells is enabled.
__EGWS_BSE_EDIT_CELLS_OUTER Editing of all outer cells is enabled.
__EGWS_BSE_EDIT_CELLS_INNER Editing of inner cells is enabled.
__EGWS_BSE_WALK_HORZ The continuous editing of the inner cells is enabled in the horizontal direction. When the in-place editor is open with the caret at the beginning and you press the left arrow button, the current editor closes, the previous cell in the same row gets focus, and a new instance of the in-place editor opens. When the in-place editor is open with the caret at the end and you press the right arrow button, the current editor is closes, the next cell in the same row gets focus, and a new instance of the in-place editor opens.
__EGWS_BSE_WALK_VERT The continuous editing of the inner cells is enabled in the vertical direction. When the in-place editor is open and you press the up arrow button, the current editor closes, the upper cell in the same column gets focus, and a new instance of the in-place editor opens. When the in-place editor is open and you press the down arrow button, the current editor is closes, the lower cell in the same column gets focus, and a new instance of the in-place editor opens.
__EGWS_BSE_WALK_HORZ_NO_EDIT Disables editing the cell that gets focus after pressing the left/right arrow key in an edited cell. This style should be used in conjunction with the __EGWS_BSE_WALK_HORZ style.
__EGWS_BSE_WALK_VERT_NO_EDIT Disables editing the cell that gets focus after pressing the up/down arrow key in an edited cell. This style should be used in conjunction with the __EGWS_BSE_WALK_VERT style.
__EGWS_BSE_WALK The continuous editing of the inner cells is enabled in the horizontal and vertical directions.
__EGWS_BSE_BUTTONS_PERSISTENT Cell buttons are persistently visible.
__EGWS_BSE_BUTTONS_IN_FOCUSED_CELL Buttons in the focused cell become visible.
__EGWS_BSE_BUTTONS_IN_FOCUSED_ROW Buttons in all the cells in the row specified by the focused cell become visible.
__EGWS_BSE_BUTTONS_IN_FOCUSED_COLUMN Buttons in all the cells in the column specified by the focused cell become visible.
__EGWS_BSE_BUTTONS_IN_HOVERED_CELL Buttons in the hovered cell are visible.
__EGWS_BSE_BUTTONS_IN_HOVERED_ROW Buttons in all the cells in the row specified by the hovered cell are visible.
__EGWS_BSE_BUTTONS_IN_HOVERED_COLUMN Buttons in all the cells in the column specified by the focused cell are visible.
__EGWS_BSE_BUTTONS_IN_SELECTED_CELLS Buttons in the selected cells are visible.
__EGWS_BSE_BUTTONS_IN_SELECTED_ROW Buttons in all the cells in the row that has at least one selected cell are visible.
__EGWS_BSE_BUTTONS_IN_SELECTED_COLUMN Buttons in all the cells in the column that has at least one selected cell are visible.
__EGWS_BSE_EDIT_SINGLE_LCLICK Activation of the in-place editor with left button mouse click is enabled.
__EGWS_BSE_EDIT_SINGLE_FOCUSED_ONLY The behavior specified by __EGWS_BSE_EDIT_SINGLE_LCLICK is applied only to the focused cell.
__EGWS_BSE_EDIT_DOUBLE_LCLICK Activation of the in-place editor with left button mouse double click is enabled.
__EGWS_BSE_EDIT_RETURN_CLICK Activation of the in-place editor by pressing the VK_RETURN key is enabled.
__EGWS_BSE_SORT_COLUMNS_ALLOW_MULTIPLY Multiple column sorting is enabled (NOTE: Use in conjunction with __EGWS_BSE_SORT_COLUMNS).
__EGWS_BSE_SORT_ROWS_ALLOW_MULTIPLY Multiple row sorting is enabled (NOTE: Use in conjunction with __EGWS_BSE_SORT_ROWS).
__EGWS_BSE_SORT_COLUMNS_T Sorting by clicking outer cells at top.
__EGWS_BSE_SORT_COLUMNS_B Sorting by clicking outer cells at bottom.
__EGWS_BSE_SORT_COLUMNS Sorting by clicking outer cells at top and bottom.
__EGWS_BSE_SORT_MULTIPLY_COLUMNS Multiple column sorting for the style __EGWS_BSE_SORT_COLUMNS is enabled.
__EGWS_BSE_SORT_ROWS_L Sorting by clicking outer cells on left.
__EGWS_BSE_SORT_ROWS_R Sorting by clicking outer cells on right
__EGWS_BSE_SORT_ROWS Sorting by clicking outer cells on left and right
__EGWS_BSE_SORT_MULTIPLY_ROWS Multiple row sorting for the style __EGWS_BSE_SORT_ROWS is enabled.
__EGWS_BSE_EDIT_RETURN_MOVES_NEXT_ROW Move focus to the next row when the focused cell editing is complete with Enter key.
__EGWS_BSE_EDIT_F2_CLICK Use F2 key for activating in place cell editor.
__EGWS_BSE_DEFAULT Specifies the default state in regard to the __EGWS_BSE_* styles (__EGWS_BSE_BUTTONS_PERSISTENT, __EGWS_BSE_EDIT_SINGLE_LCLICK, __EGWS_BSE_EDIT_SINGLE_FOCUSED_ONLY, __EGWS_BSE_EDIT_F2_CLICK, __EGWS_BSE_EDIT_DOUBLE_LCLICK and __EGWS_BSE_EDIT_RETURN_CLICK are turned on).

Below are listed additional extended styles (used in the CExtGridWnd::BseGetStyleEx() and CExtGridWnd::BseModifyStyleEx() methods):

Value Meaning
__EGBS_BSE_EX_HIGHLIGHT_PRESSING_COLUMNS_INNER All inner cells in the column become highlighted when the user presses the column header cell.
__EGBS_BSE_EX_HIGHLIGHT_PRESSING_COLUMNS_OUTER When pressed, the column header cell becomes highlighted.
__EGBS_BSE_EX_HIGHLIGHT_PRESSING_COLUMNS All inner and outer cells in the column become highlighted when the user presses the column header cell.
__EGBS_BSE_EX_HIGHLIGHT_PRESSING_ROWS_INNER All inner cells in the row become highlighted when the user presses the row header cell.
__EGBS_BSE_EX_HIGHLIGHT_PRESSING_ROWS_OUTER When pressed, the row header cell becomes highlighted.
__EGBS_BSE_EX_HIGHLIGHT_PRESSING_ROWS All inner and outer cells in the row become highlighted when the user presses the row header cell.
__EGBS_BSE_EX_HIGHLIGHT_PRESSING_ALL All inner and outer cells in the column/row become highlighted when the user presses the column/row header cell.
__EGBS_BSE_EX_HIGHLIGHT_PRESSING_STAY_COLUMNS The column inner cells and/or column header cells remain highlighted until sorting by column or drag-and-dropping is completed.
__EGBS_BSE_EX_HIGHLIGHT_PRESSING_STAY_ROWS The row inner cells and/or row header cells remain highlighted until sorting by row or drag-and-dropping is completed.
__EGBS_BSE_EX_HIGHLIGHT_PRESSING_STAY Specifies the combination of the __EGBS_BSE_EX_HIGHLIGHT_PRESSING_STAY_COLUMNS and __EGBS_BSE_EX_HIGHLIGHT_PRESSING_STAY_ROWS constants.
__EGBS_BSE_EX_DRAG_START_COLUMNS The drag-and-drop start event for the column header cells is enabled.
__EGBS_BSE_EX_DRAG_SWAP_COLUMNS The drag-and-drop of columns (by dragging and dropping column header cells) is enabled.
__EGBS_BSE_EX_DRAG_START_ROWS The drag-and-drop start event for the row header cells is enabled.
__EGBS_BSE_EX_DRAG_SWAP_ROWS The drag-and-drop of rows (by dragging and dropping column header cells) is enabled.
__EGBS_BSE_EX_DRAG_COLUMNS Specifies the combination of the __EGBS_BSE_EX_DRAG_START_COLUMNS and __EGBS_BSE_EX_DRAG_SWAP_COLUMNS constants.
__EGBS_BSE_EX_DRAG_ROWS Specifies the combination of__EGBS_BSE_EX_DRAG_START_ROWS and __EGBS_BSE_EX_DRAG_SWAP_ROWS constants.
__EGBS_BSE_EX_DRAG_REMOVE_COLUMNS The removing of a column when dragging its header cell out of the header row area is enabled.
__EGBS_BSE_EX_DRAG_REMOVE_ROWS The removing of a row when dragging its header cell out of the header column area is enabled.
__EGBS_BSE_EX_PROPORTIONAL_COLUMN_WIDTHS The grid columns should be resized proportionally when the width of the grid window changes.
__EGBS_BSE_EX_PROPORTIONAL_ROW_HEIGHTS The grid rows should be resized proportionally when the height of the grid control changes.
__EGBS_BSE_EX_PROPORTIONAL_XY Specifies the combination of__EGBS_BSE_EX_PROPORTIONAL_COLUMN_WIDTHS and __EGBS_BSE_EX_PROPORTIONAL_ROW_HEIGHTS constants.
__EGBS_BSE_EX_DBLCLK_BEST_FIT_COLUMN_OUTER The grid column should be resized to fit the longest cell content when the right-side vertical separator between header cells at top/bottom is double clicked.
__EGBS_BSE_EX_DBLCLK_BEST_FIT_COLUMN_INNER The grid column should be resized to fit the longest cell content when the right-side vertical separator between inner data cells is double clicked.
__EGBS_BSE_EX_DBLCLK_BEST_FIT_ROW_OUTER The grid row should be resized to fit the content when the bottom horizontal separator between header cells on left/right is double clicked.
__EGBS_BSE_EX_DBLCLK_BEST_FIT_ROW_INNER The grid row should be resized to fit the content when the bottom vertical separator between inner data cells is double clicked.
__EGBS_BSE_EX_DBLCLK_BEST_FIT_VISIBLE_ROWS The best fit feature for rows should measure the heights of inner data cells in the displayed range only.
__EGBS_BSE_EX_DBLCLK_BEST_FIT_VISIBLE_COLUMNS The best fit feature for columns should measure the widths of inner data cells in the displayed range only.
__EGBS_BSE_EX_DBLCLK_BEST_FIT_COLUMN_MEASURE_OUTER The best fit feature for columns should measure the heights of outer data cells at top/bottom.
__EGBS_BSE_EX_DBLCLK_BEST_FIT_COLUMN_MEASURE_INNER The best fit feature for columns should measure the widths of inner data cells.
__EGBS_BSE_EX_DBLCLK_BEST_FIT_ROW_MEASURE_OUTER The best fit feature for rows should measure the widths of outer data cells on left/right.
__EGBS_BSE_EX_DBLCLK_BEST_FIT_ROW_MEASURE_INNER The best fit feature for columns should measure the widths of inner data cells.
__EGBS_BSE_EX_DBLCLK_BEST_FIT_COLUMN_MEASURE_ALL Specifies the combination of__EGBS_BSE_EX_DBLCLK_BEST_FIT_COLUMN_MEASURE_OUTER and __EGBS_BSE_EX_DBLCLK_BEST_FIT_COLUMN_MEASURE_INNER constants.
__EGBS_BSE_EX_DBLCLK_BEST_FIT_ROW_MEASURE_ALL Specifies the combination of__EGBS_BSE_EX_DBLCLK_BEST_FIT_ROW_MEASURE_OUTER and __EGBS_BSE_EX_DBLCLK_BEST_FIT_ROW_MEASURE_INNER constants.
__EGBS_BSE_EX_DBLCLK_BEST_FIT_COLUMN Specifies the combination of__EGBS_BSE_EX_DBLCLK_BEST_FIT_COLUMN_OUTER and __EGBS_BSE_EX_DBLCLK_BEST_FIT_COLUMN_MEASURE_ALL constants.
__EGBS_BSE_EX_DBLCLK_BEST_FIT_ROW Specifies the combination of__EGBS_BSE_EX_DBLCLK_BEST_FIT_ROW_OUTER and __EGBS_BSE_EX_DBLCLK_BEST_FIT_ROW_MEASURE_ALL constants.
__EGBS_BSE_EX_DBLCLK_BEST_FIT_AVAILABLE Specifies the combination of__EGBS_BSE_EX_DBLCLK_BEST_FIT_COLUMN_OUTER, __EGBS_BSE_EX_DBLCLK_BEST_FIT_COLUMN_INNER, __EGBS_BSE_EX_DBLCLK_BEST_FIT_ROW_OUTER and __EGBS_BSE_EX_DBLCLK_BEST_FIT_ROW_INNER constants.
__EGBS_BSE_EX_EAL_BOTTOM_H The data area with no cells at the bottom should have horizontal gridlines.
__EGBS_BSE_EX_EAL_BOTTOM_V The data area with no cells at the bottom should have vertical gridlines.
__EGBS_BSE_EX_EAL_RIGHT_H The data area with no cells on the right should have horizontal gridlines.
__EGBS_BSE_EX_EAL_RIGHT_V The data area with no cells on the right should have vertical gridlines.
__EGBS_BSE_EX_EAL_CORNER_H The data area with no cells on the right and at the bottom should have horizontal gridlines.
__EGBS_BSE_EX_EAL_CORNER_V The data area with no cells on the right and at the bottom should have vertical gridlines.
__EGBS_BSE_EX_AUTO_BEST_FIT_COLUMNS Turns on the automatic best fitting for columns which have header cells marked with the __EGCS_EX_AUTO_BEST_FIT extended grid cell style.
__EGBS_BSE_EX_AUTO_BEST_FIT_ROWS Turns on the automatic best fitting for rows which have header cells marked with the __EGCS_EX_AUTO_BEST_FIT extended grid cell style.

Below are listed the advanced grid control styles (used in the CExtGridWnd::AdvGetStyle() and CExtGridWnd::AdvModifyStyle() methods):

Value Meaning
__EGWS_ADV_ENABLE_DATA_DND_DRAG Enable dragging inner data cells.
__EGWS_ADV_ENABLE_DATA_DND_DROP Enable drop target. Accept dropped grid data.
__EGWS_ADV_CELL_CONTENT_TIPS_INNER Enable content tips over inner data cells.
__EGWS_ADV_CELL_CONTENT_TIPS_OUTER_L Enable content tips over outer header cells at left.
__EGWS_ADV_CELL_CONTENT_TIPS_OUTER_R Enable content tips over outer header cells at right.
__EGWS_ADV_CELL_CONTENT_TIPS_OUTER_T Enable content tips over outer header cells at top.
__EGWS_ADV_CELL_CONTENT_TIPS_OUTER_B Enable content tips over outer header cells at bottom.
__EGWS_ADV_CELL_CONTENT_TIPS_OUTER_HORZ Specifies the combination of__EGWS_ADV_CELL_CONTENT_TIPS_OUTER_T and __EGWS_ADV_CELL_CONTENT_TIPS_OUTER_B constants.
__EGWS_ADV_CELL_CONTENT_TIPS_OUTER_VERT Specifies the combination of__EGWS_ADV_CELL_CONTENT_TIPS_OUTER_L and __EGWS_ADV_CELL_CONTENT_TIPS_OUTER_R constants.
__EGWS_ADV_CELL_CONTENT_TIPS_OUTER Specifies the combination of__EGWS_ADV_CELL_CONTENT_TIPS_OUTER_HORZ and __EGWS_ADV_CELL_CONTENT_TIPS_OUTER_VERT constants.

See Also

Class Members | Hierarchy Chart