Previous Topic

Next Topic

Inhoudsopgave

Book Index

CreateAllItems Procedure

Function Procedure CreateAllItems

Description

Creates all columns based on the connected dataset.

Remarks

Field initialization has to be done before creating the columns

Code Snippet

Call frmIsahDBGridExample_InitializeComponents()

Call InitializeDataSets()

Set idbgridProcHourlines = IsahObjects.Get("TIsahDBGrid")

idbgridProcHourlines.InitGrid

idbgridProcHourlines.Datasource = dsProcHourLines

idbgridProcHourlines.CreateAllItems 'After creating the items, the column objects can be accessed

Sub InitializeDataSets

Rem The query for showing some time fields from T_ProcessedHourLines

icdsqryProcHourLines.SQL.Text = "select ProcHourLineNr, ProcHourLinesLineNr, PeriodStartTime, " &_

"PeriodEndTime, PeriodTotalTime from T_Processedhourlines"

icdsqryProcHourLines.active = true

Rem Field initialization has to be done BEFORE creating the columns (CreateAllItems)

icdsqryProcHourLines.FieldByName("PeriodStartTime").FloatKind = 2

icdsqryProcHourLines.FieldByName("PeriodStartTime").FieldTimeRange = 2

icdsqryProcHourLines.FieldByName("PeriodStartTime").FieldTimeKind = 2

End Sub