# class hk_dsgrid

base class for widgets which show multi column data in a grid. More...

Definition | `#include <hk_classes/hk_classes/hk_dsgrid.h>`
Inherits | hk_dsvisible [public ]
Inherited by | hk_kdegrid
List of all Methods

Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- hk_dsgrid (hk_form* form=NULL )
- virtual ~hk_dsgrid (void)
- hk_dsgridcolumn* gridcolumn (unsigned int c)
- unsigned int columnscount (void)
- void set_gridcolumnwidth (unsigned int col,int newwidth)
- void change_columnposition (unsigned int from,unsigned int to)
- void set_gridcolumns (vector<hk_dsgridcolumn>& c,bool registerchange=true)
- void set_gridcolumns (list<hk_string>&sl)
- void clear_gridcolumn (void)
- void set_hold_rowdefinition (bool h=true)
- void set_enablingbehaviour (bool add_col,bool del_col)
- virtual void savedata (ostream& s,bool saveall)
- virtual void savedata (ostream&s )
- virtual void loaddata (const hk_string& definition)
- virtual void set_datasource (hk_datasource*)
- list <hk_string>* visible_columns (void)
- list <hk_string>* nonvisible_columns (void)
- bool save_query (const hk_string& s="",bool ask=true)
- bool load_query (void)
- bool save_table (const hk_string& s="",bool ask=true)
- bool load_table (void)
- void set_rowheight (int,bool registerchange=true)
- int rowheight (void)

#### Protected Methods

- bool datasource_enable (void)
- bool datasource_disable (void)
- bool columns_new_created (void)
- virtual void before_store_changed_data (void)
- virtual bool table_structure_changes (void)
- virtual void widget_specific_columns_created (void)
- virtual void widget_specific_rowheight_changes (void)

## Detailed Description

base class for widgets which show multi column and multi row data in a grid.

hk_dsgrid (hk_form* form=NULL )

### hk_dsgrid

~hk_dsgrid (void)

### ~hk_dsgrid

[virtual]

hk_dsgridcolumn* gridcolumn (unsigned int c)

### gridcolumn

returns a specific gridcolumn

Parameters:

c | number of the column.

unsigned int columnscount (void)

### columnscount

returns the number of columns shown in the grid.

void set_gridcolumnwidth (unsigned int col,int newwidth)

### set_gridcolumnwidth

sets the new width of a specific column.

Parameters:

col | number of the column
newsize | the new width of the column

void change_columnposition (unsigned int from,unsigned int to)

### change_columnposition

it's possible to change the order of the columns

Parameters:

from | position where the column was originally
to | target position

void set_gridcolumns (vector<hk_dsgridcolumn>& c,bool registerchange=true)

### set_gridcolumns

you can manually set the gridcolumn definition.

Parameters:

c | the new defintion of the gridcolumns, all values in these definitions will be used

void set_gridcolumns (list<hk_string>&sl)

### set_gridcolumns

you can manually set the gridcolumn definition.The new defintion of the gridcolumns, all columns get default values.

Parameters:

sl | the strings contain the names of the columns.

void clear_gridcolumn (void)

### clear_gridcolumn

void set_hold_rowdefinition (bool h=true)

### set_hold_rowdefinition

If true and you change the row definitions (i.e. column size) after disabling and reenabling your definitions still exist, if false the rows will be newly built. Default is true.

See also: set_enablingbehaviour

void set_enablingbehaviour (bool add_col,bool del_col)

### set_enablingbehaviour

if set_hold_rowdefinition is true, this function defines what exactly to do during enabling

Parameters:

add_col | if true, columns of the datasource will be added to the grid if no equivalent gridcolumn exists. Default is false.
del_col | if true, gridcolumns will be removed if no equivalent columns in the datasource exist. Default is false.

void savedata (ostream& s,bool saveall)

### savedata

[virtual]

Reimplemented from hk_dsvisible.

void savedata (ostream&s )

### savedata

[virtual]

Reimplemented from hk_dsvisible.

void loaddata (const hk_string& definition)

### loaddata

[virtual]

Reimplemented from hk_dsvisible.

void set_datasource (hk_datasource*)

### set_datasource

[virtual]

Reimplemented from hk_dsvisible.

list <hk_string>* visible_columns (void)

### visible_columns

list <hk_string>* nonvisible_columns (void)

### nonvisible_columns

bool save_query (const hk_string& s="",bool ask=true)

### save_query

bool load_query (void)

### load_query

bool save_table (const hk_string& s="",bool ask=true)

### save_table

bool load_table (void)

### load_table

void set_rowheight (int,bool registerchange=true)

### set_rowheight

int rowheight (void)

### rowheight

bool datasource_enable (void)

### datasource_enable

[protected]

Reimplemented from hk_dsvisible.

bool datasource_disable (void)

### datasource_disable

[protected]

Reimplemented from hk_dsvisible.

bool columns_new_created (void)

### columns_new_created

[protected]

Reimplemented from hk_dsvisible.

void before_store_changed_data (void)

### before_store_changed_data

[protected virtual]

Reimplemented from hk_dsvisible.

bool table_structure_changes (void)

### table_structure_changes

[protected virtual]

Reimplemented from hk_dsvisible.

void widget_specific_columns_created (void)

### widget_specific_columns_created

[protected virtual]

void widget_specific_rowheight_changes (void)

### widget_specific_rowheight_changes

[protected virtual]

- Version: $Revision: 1.26 $
- Author: Horst Knorr (hk_classes@knoda.org)
- Generated: horst on horstnotebook on Tue Mar 30 19:06:43 2004, using kdoc 2.0a54.