Delphi & C++ Builder components library
and Software development
 
 
 

DBStringGrid

DBStringGrid is extension of StringGridEd component (non database grid) with functions for batch loading and saving data from/to dataset.

DBStringGridEd is useful in many situations when user needs to modify more records, data from more tables or data in pivot table with batch saving. Standard DBGrid with record oriented behaviour is usually not suitable.

DBStringGridEd supports 4 basic modes:

  • Simple table mode
  • Predefined rows multitable mode
  • Pivot table mode
  • Multirow mode new

Simple table mode

  • load and show all records from one table (similar as DBGrid)
  • columns can be defined manually (use property FieldName, ButtonStyle, DataType) or automatically from dataset structure by procedure CreateTableColumns or property CreateTableColNow
  • property DataSource define link to dataset data
  • property KeyFieldName define name of key field which contain unique record ID, property RowKeyValue can be used to read key value for any row
  • procedures LoadTableRows and SaveTableRows load /save data
  • property AutoAddNewRow defines whether user can add new records
  • event DBBeforePostEvent can be used to check/modify valued before post
  • event OnDBUpdateError can be used to handle any exception
dbstringgrid1

Predefined rows multitable mode

  • load and show values for all predefined rows
  • rows can be defined manually (set property RowKeyValue for each row) or loaded from any table together with fixed column by procedure LoadTableRows (use property DataSource + KeyFieldName)
  • columns for each dataset can be defined manually (use property FieldName, ColumnGroup, ButtonStyle, DataType)
  • procedures LoadTableData and SaveTableData load /save data (parameter KeyField defines link to each RowKeyValue, ColumnGroup defines used columns)
  • event DBBeforePostEvent can be used to check/modify valued before post
  • event OnDBUpdateError can be used to handle any exception
dbstringgrid2

Pivot table mode

  • load and show values for all predefined rows and columns
  • rows can be defined manually (set property RowKeyValue for each row) or loaded from any table together with fixed column by procedure LoadTableRows (use property DataSource + KeyFieldName)
  • columns can be defined manually (set property ColKeyValue for each column) or loaded from any table by procedure LoadPivotColumn (parameter ColumnKeyField is used to define ColKeyValue for each column, ColumnDisplayField define Column Label)
  • procedures LoadPivotData and SavePivotData load /save data (parameter RowKeyField/ColumnKeyField defines link to each RowKeyValue/ColKeyValue)
  • event DBBeforePostEvent can be used to check/modify valued before post
  • event OnDBUpdateError can be used to handle any exception
dbstringgrid3

Multirow mode

  • load and show all records from one table but show each record in the multiple rows according to MultiRowDef setting
  • each row can contain different content from the field or defined by text mask with specific format
  • Text, Memo, HTMLText, RichText, text in columns, list of objects or files is supported
  • Text, Memo or RichText editor in cell
  • procedures LoadTableMultiRows and SaveTableMultiRows load /save data
  • event DBBeforePostEvent can be used to check/modify valued before post
  • event OnDBUpdateError can be used to handle any exception
dbstringgrid4

Download demo projects to see more details.

Open documentation page.

Go back