UnboundSimpleDemo Tutorial
This tutorial covers the steps required to complete the demo showing how to use the new unbound mode. When in this mode, the grid control does not use any data source.
The tutorial comes with the following forms pre-built for you:
UnboundSimpleDemoMain - the main form
UnboundSimpleDemoAbout - about this demo
There are two main ideas illustrated by this tutorial:
Steps 1-5: set grid options
Steps 6-10: examine the major methods.
I. Set grid Options
Open the UnboundSimpleDemo project in the IDE (be sure to use the Tutorials folder rather than the Demos folder) and set focus to the UnboundSimpleDemoMain form.
Click on Customize in the grid's Structure Navigator (bottom right) to display the Grid Designer.
Select tvPlanets (not lvPlanets) and set the following Options via the Object Inspector (expanding properties where necessary):
OptionsData.Editing to False
OptionsData.Appending to False
OptionsData.Inserting to False
OptionsView.ColumnAutoWidth to True
OptionsView.HeaderAutoHeight to True
OptionsBehavior.IncSearch to True
Set the RepositoryItems property to edrepCenterText for the following columns (use multi-select): tvPlanetsNO, tvPlanetsORBITS, tvPlanetsDISCOVERER and tvPlanetsDATE.
In a similar fashion, set RepositoryItems to edrepRightText for tvPlanetsDISTANCE, tvPlanetsPERIOD and tvPlanetsRADIUS.
II. Examine the major methods
Examine the CustomizeColumns method. This procedure shows how to bind columns to different value types.
Examine the LoadData method. It shows how to populate the DataController's values (see the nested InitRecord procedure).
See the SetFilter method - this shows how to set a filter at runtime.
Find the FormCreate method and enable its code by adding `}' to its first line.
Find the FormShow method and disable its code by removing `}' from its first line. This removes the warning that the tutorial has not been completed.
Having now finished this tutorial, you may want to compare your version with the completed demo provided via the Demos folder.